Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions tests/test_pkgbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ))