ci(check): a running check on main finishes; a newer push waits its turn

The check job takes about fifty minutes and was cancelled by every newer
push to the same branch. On 2026-11-09 a morning of merges cancelled every
run, so main went hours with no finished check. On main the running check
now finishes and the newest push runs next (GitHub keeps only the newest
waiting run in a group), so no half-run check is thrown away and the tip is
always the next thing checked. Pull requests keep the old rule: a newer
push cancels the older run.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude committed 2026-11-09 15:38:00 -07:00
1 parent 5cad55023f
commit 995b3e5eaf
1 file changed
+7 -3
+7 -3
View File
@@ -4,11 +4,15 @@ name: check
on:
push:
pull_request:
# A newer push to the same branch makes an older check pointless: it is
# cancelled, so only the newest reports.
# On a pull request a newer push makes an older check pointless: it is
# cancelled, so only the newest reports. On main a running check finishes:
# the job takes about fifty minutes, and on 2026-11-09 a morning of pushes
# cancelled every run, so nothing on main was checked for hours. A newer
# push waits its turn (GitHub keeps only the newest waiting run), so the
# tip is always checked next and no half-run check is thrown away.
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
check:
runs-on: ubuntu-24.04