Files
FWS-Kitty/.gitea/workflows/ci.yml
T
BlackAngelTV 7b64da8a38
CI / check (push) Failing after 5s
Release / check (push) Failing after 4s
Release / release (push) Skipped
ci(release): publish the Arch package when the version changes
Releases were built and uploaded by hand, so the published package could
lag behind main and nothing checked the tree before it shipped. The new
version file drives a pipeline that lints, builds and tests the exact
commit, then creates the Gitea release and pushes the package to the
pacman repository.
2026-11-25 10:14:56 +01:00

63 lines
1.9 KiB
YAML

# Continuous integration: every pull request and every push to main must pass
# the linter, the build and the tests. Packaging lives in package.yml, which
# only runs when the version file changes.
name: CI
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
# A new push on the same branch supersedes the previous run, but main builds run
# to completion so a broken merge is always reported.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
check:
# Arch Linux host runner: kitty builds against the Arch toolchain (base-devel,
# go, python, harfbuzz, shader-slang...) and makepkg refuses to run as root.
runs-on: arch-host
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Check the version files agree
run: ./packaging/check-version.sh
- name: Lint Python
run: |
ruff check .
ruff format --check .
- name: Check Go formatting
run: |
# Generated files only exist after ./dev.sh build and are not tracked,
# so only the committed sources are checked.
unformatted="$(git ls-files -z '*.go' | xargs -0 gofmt -s -l)"
if [ -n "$unformatted" ]; then
echo "::error::gofmt is required for:"
echo "$unformatted"
exit 1
fi
- name: Build
run: ./dev.sh build
# The Go packages import generated code and embedded data produced by the
# build above, so vet and tests cannot run on a bare checkout.
- name: Vet
run: go vet ./kittens/file_manager/
- name: Test
run: go test --tags testing ./kittens/file_manager/
- name: Smoke test the binaries
run: |
./kitty/launcher/kitty --version
./kitty/launcher/kitten --version