Skip to content

fix(ci): stop the two copies of Tests cancelling each other on main - #160

Merged
thenabbu merged 1 commit into
mainfrom
fix/tests-double-cancel
Nov 5, 2026
Merged

thenabbu merged 1 commit into
mainfrom
fix/tests-double-cancel

Conversation

@thenabbu

@thenabbu thenabbu commented Nov 5, 2026

Copy link
Copy Markdown
Owner

What

tests.yml kept its own push: [main] trigger while also being called as a reusable job from build.yml. Every main push therefore started two copies of the workflow on the same ref, and the concurrency group (${{ github.workflow }}-${{ github.ref }}, cancel-in-progress: true) let one cancel the other.

The nested call lost. Observed on the #159 merge:

Build & Push   failure   jobs: build: skipped   (no tests job at all)
Tests          success   (the standalone copy, same sha)

So the image publish silently had no gate behind it — the exact thing build.needs: [tests] exists to guarantee. This is a regression I introduced when I added concurrency to build.yml, and it only shows up on main, never on a PR.

tests.yml now triggers on pull_request + workflow_call only. On main it runs once, as the job build.yml gates on — which is what the comment in build.yml always claimed.

Branch protection's required checks (unit, docker, e2e, scans) are unaffected: those still fire on pull_request, which is where they gate a merge.

Verification

  • actionlint exit 0; triggers confirmed as ['pull_request', 'workflow_call'].
  • The fix is a trigger change, so the real proof is the next main push: Build & Push should run two jobs (tests, then build), not one skipped build.

tests.yml kept its own `push: [main]` trigger while also being called as a
reusable job from build.yml. Every main push therefore started TWO copies of
the workflow on the same ref, and the concurrency group
(`${{ github.workflow }}-${{ github.ref }}`, cancel-in-progress) let one cancel
the other. The nested call lost: build.yml ran with a `skipped` build job and
no tests at all, so the image publish silently had no gate behind it.

Observed on the #159 merge: "Build & Push" concluded `failure` with exactly one
job, `build: skipped`, and no tests job in the run at all, while the standalone
Tests run on the same sha was green.

tests.yml now triggers on `pull_request` and `workflow_call` only. On main it
runs once, as the job build.yml gates on - which is what the comment in
build.yml always claimed.
@thenabbu
thenabbu merged commit 40ce671 into main Nov 5, 2026
11 checks passed
@thenabbu
thenabbu deleted the fix/tests-double-cancel branch November 5, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant