fix(ci): stop running every job twice - #118
Merged
Merged
Conversation
Pushing to a branch with an open PR triggered both `push` and `pull_request`, so each job ran twice. The concurrency group keys on github.ref, which differs between the two events (refs/heads/… vs refs/pull/N/merge), so they land in separate groups and neither cancels the other. Scope `push` to next and main: those still get validated on merge, while feature branches are covered by their pull request — which also tests the merge result rather than just the branch tip. Halves CI time per push, which matters now that the wire tests take 6-8 minutes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
Every check appeared twice on PRs —
ci / check (pull_request)andci / check (push), and so on forcompileandtest:Cause
ci.ymllistened to bothpush(unfiltered) andpull_request. For a branch with an open PR in the same repo, onegit pushfires both events. Theconcurrencygroup keys ongithub.ref, which differs between them (refs/heads/<branch>vsrefs/pull/N/merge), so the runs land in separate groups and neither cancels the other.Mine to own: #112 added the
pull_requesttrigger without narrowingpush.Fix
Scope
pushto the long-lived branches:next/mainare still validated on merge; feature branches are covered by their PR — which is the better signal anyway, sincepull_requestbuilds the merge result rather than just the branch tip. Halves CI time per push, which matters now the wire tests take 6–8 minutes. It also stopscifiring on tag pushes (those arerelease.yml's job).This PR self-verifies: it should show exactly one run of each check.
🤖 Generated with Claude Code