Files
FWS-Kitty/.gitea/workflows/ci.yml
T
BlackAngelTV 86428e1863
CI / check (push) Failing after 6s
ci: install the Arch build dependencies on the runner
The self-hosted runner is a bare Arch host, so ruff and the compilation
libraries were missing and the first pipeline run stopped at the lint step.
The installer only calls pacman for what is absent, so later runs stay
unprivileged.
2026-11-25 10:17:18 +01:00

66 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: Install the build dependencies
run: ./packaging/install-ci-deps.sh
- 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