Files
FWS-Kitty/.gitea/workflows/ci.yml
T
BlackAngelTV aa1fff96b4
CI / check (push) Successful in 2m40s
ci(release): build the package once and check that build
The release pipeline compiled the project twice: ./dev.sh build in the check
job, then makepkg in the release job. A single job now builds with makepkg and
runs go vet, the tests and the smoke test on that tree, so publishing starts
only after the shipped build passed.

CI skips version-only pushes, which package.yml already covers, and the release
fails early when RELEASE_TOKEN is missing instead of reporting a bogus 401. The
package name no longer keeps the ./ prefix from ls, which corrupted the asset
and X-Filename names.
2026-11-25 11:05:40 +01:00

69 lines
2.1 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]
# A version-only commit is released by package.yml, which runs the same
# checks on the package build; CI would build that commit a second time.
paths-ignore: [version]
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