ci: stop running the full matrix twice on every PR - #87
Merged
Conversation
ci.yml listened on both `push: branches: ["**"]` and `pull_request`, so any PR from a branch in this repo triggered two independent runs of lint, build and the 4-way CPU matrix. The `concurrency` group could not collapse them because `github.ref` differs per event: `refs/heads/<branch>` on push vs `refs/pull/<n>/merge` on pull_request, putting each run in its own group. Scope the push trigger to main. PR branches stay covered by `pull_request`, main stays covered on merge, and tags are untouched (release.yml owns those). Pre-PR branch runs remain available via the existing workflow_dispatch.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe CI workflow’s push trigger now runs only on ChangesCI Trigger Scoping
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This was referenced Jul 16, 2026
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.
Fixes #86.
Problem
ci.ymllistened on bothpush: branches: ["**"]andpull_request. Any PR from a branch in this repo matched both events, so lint, build, and the 4-way CPU matrix each ran twice per push — visible on #83 as paired(push)/(pull_request)checks.The existing
concurrencygroup could not collapse the pair.github.refresolves differently per event —refs/heads/<branch>on push vsrefs/pull/<n>/mergeon pull_request — so each run landed in its own group and neither cancelled the other.Fix
Scope the push trigger to
main:pull_requestevent.mainstays covered on merge.release.ymlowns those, andci.ymlstill does not fire on tag pushes.Also refreshed the
ci.ymlheader comment and corrected a now-stale cross-reference inrelease.ymlthat described ci.yml's triggers.Tradeoff
Pushing a branch with no PR open no longer triggers CI automatically. This is the conventional arrangement, and it is the only way to get one run per PR without querying the API mid-workflow. The existing
workflow_dispatchcovers pre-PR branch runs from the Actions tab.Verification
Both workflows parse, and the resulting trigger sets are as intended: CI on
push→main+pull_request+workflow_dispatch; Release onpush→tags v*.actionlintwas not available in the working environment, so that check was skipped rather than passed. The real confirmation is this PR's own check list — one run per context instead of two.Summary by CodeRabbit
mainbranch.