From 9333015ff20fb079fc0305b05f45fa5a4fbfce12 Mon Sep 17 00:00:00 2001 From: Philippe Matray Date: Sat, 5 Sep 2026 01:58:26 +0200 Subject: [PATCH] fix(ci): build the package without re-running the selftest v0.4.0 published with no package: the job failed in check(), which runs bin/aikit-selftest. In a build container 40 of its 61 checks fail for want of tmux, sqlite, gh and a session -- for want of an environment, not for want of correctness. The selftest is not being skipped. It is its own job in ci.yml and has to be green before anything reaches main; it passed on the PR that added this package. Running it a second time somewhere it structurally cannot work only ever produces a false red, and a false red on the packaging job means a release with no package -- which is the whole bug this feature exists to fix. check() stays in the PKGBUILD: someone building by hand on a real machine has the environment and should get the check. Only the container skips it, and the comment says why this repo's copy of the job differs from the other four. A test pins both halves: --nocheck in the workflow, and aikit-selftest still a job in ci.yml. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01SYBhT1xfp3MQ1w3687F4Mp --- .github/workflows/release-please.yml | 9 ++++++++- tests/test_pkgbuild.sh | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 6ffc9c7..7b32a2d 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -90,7 +90,14 @@ jobs: sed -i "s/^pkgver=.*/pkgver=${TAG#v}/" PKGBUILD grep -q "^pkgver=${TAG#v}$" PKGBUILD useradd -m build && chown -R build:build . - su build -c 'makepkg -f --nodeps --noconfirm' + # --nocheck, unlike the other repos' copies of this job: this + # PKGBUILD's check() runs bin/aikit-selftest, which needs tmux, sqlite, + # gh and a real session. In a build container 40 of its 61 checks fail + # for want of an environment, not for want of correctness. The selftest + # is not skipped -- it is a job of its own in ci.yml, and it has to be + # green before anything reaches main. Running it twice, the second time + # somewhere it cannot work, only ever produces a false red. + su build -c 'makepkg -f --nodeps --nocheck --noconfirm' ls -l ./*.pkg.tar.* - name: Attach it to the release diff --git a/tests/test_pkgbuild.sh b/tests/test_pkgbuild.sh index 1e47db1..b1e02df 100755 --- a/tests/test_pkgbuild.sh +++ b/tests/test_pkgbuild.sh @@ -35,6 +35,12 @@ check "and the rewrite is verified" grep -q 'grep -q "\^pkgver=\${TAG#v}\$ check "extra-files is not used" bash -c '! grep -q "extra-files" release-please-config.json' check "the upload globs" grep -q '\*.pkg.tar.\*' "$WF" check "gh is installed in the container" grep -q 'github-cli' "$WF" +# check() runs the selftest, which needs tmux/sqlite/gh and a session; in a build +# container it fails for want of an environment. ci.yml runs it properly and has +# to be green before main -- running it twice, the second time somewhere it +# cannot work, only ever produces a false red. +check "the build skips check() in CI" grep -q -- '--nocheck' "$WF" +check "but the selftest is still a gate" grep -q 'aikit-selftest' .github/workflows/ci.yml (( fails == 0 )) && echo "all ok" || echo "$fails failed" exit $(( fails > 0 ))