Repository navigation
ci: stop running CI twice for every PR commit - #119
Open
austenstone wants to merge 1 commit into
Open
austenstone wants to merge 1 commit into
austenstone wants to merge 1 commit into
Conversation
The push trigger on non-main branches fired alongside pull_request for the same SHA, and the ref-based concurrency group kept them from cancelling each other. 21 of 30 CI-tested SHAs in the last 90 days ran CI twice. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
austenstone
marked this pull request as ready for review
October 12, 2026 02:57
This branch has not been deployed
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.
What
Drop the
push: branches-ignore: [main]trigger fromci.yml.pull_request(the requiredcicheck) andworkflow_dispatchstay.Why
Every commit on a PR branch ran CI twice: once for
push, once forpull_request. The concurrency group isci-${{ github.ref }}, and those refs differ (refs/heads/xvsrefs/pull/N/merge), so neither run cancelled the other. Same SHA, same steps, same result, double the minutes.Baseline (last 90 days, 2026-07-13 → 2026-10-11, all CI + Deploy jobs via jobs API)
pull_requestpushtest:coverage(~30s); coverage thresholds are enforced so it stays.noEmit, so build'stsc -bis an incremental no-op after typecheck; removing it only shifts the time.Expected after
1 CI run per PR commit instead of 2. Projected on the same window: 51 → 30 CI runs, 74 → 46 rounded CI min (−38%).
Trade-off: a branch pushed before a PR exists no longer gets automatic CI. Run it via Actions → CI → Run workflow if needed.
mainis still validated by the Deploy workflow on push.Verification
actionlintclean before/after.zizmorfindings unchanged (pre-existing pinning findings, out of scope).ci(ruleset onmain) is produced by thepull_requestrun, unchanged.Note: this repo is public, so billed cost is $0 either way. Rounded minutes are the cost-equivalent for a private repo on standard runners.