Skip to content

CI: test branches through their pull request, not on every push too - #44

Merged
jowr merged 1 commit into
masterfrom
chp/ci-dedupe
Nov 3, 2026
Merged

jowr merged 1 commit into
masterfrom
chp/ci-dedupe

Conversation

@jowr

@jowr jowr commented Nov 3, 2026

Copy link
Copy Markdown
Member

tests.yml ran on push to every branch and on pull_request. Every push to a branch with an open pull request therefore ran the whole matrix twice: once on the branch head (refs/heads/...) and once on the merge commit (refs/pull/N/merge). Because the two runs have different refs, a concurrency group could not reliably cancel one with the other.

Change

  • push runs on master only. A branch is tested through its pull request, which tests the merge commit, the thing that actually gets merged.
  • workflow_dispatch is added, so a branch without a pull request can still be run by hand (Actions tab, "Run workflow").
  • A concurrency group per pull request with cancel-in-progress for pull request runs: a newer push cancels the run of the commit it replaces. Runs on master and the run that release.yml makes through workflow_call are never cancelled.

Trade-off

A pushed branch without a pull request gets no CI until a pull request is opened or the workflow is started by hand.

Testing

The workflow file parses (checked with PyYAML). This pull request's own CI is the real check: it should show one tests run per push, triggered by pull_request.


Generated by Claude Code

tests.yml ran on push to every branch and on pull_request, so each push
to a branch with an open pull request ran the whole matrix twice (the
branch head and the merge commit). The two runs use different refs, so
they could not cancel each other.

- push runs on master only; a branch is tested through its pull request,
  or by hand with workflow_dispatch.
- One run per pull request at a time: a newer push cancels the run of
  the commit it replaces. Runs on master are never cancelled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 21f68f06-da61-4a3b-bf3f-d2eead4138c8
Commits

Reviewing files that changed from the base of the PR and between d479fb0 and 375abb5.

Files selected for processing: 1
  • .github/workflows/tests.yml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@jowr
jowr merged commit 9277bca into master Nov 3, 2026
3 of 10 checks passed
@jowr
jowr deleted the chp/ci-dedupe branch November 3, 2026 11:49
jowr added a commit that referenced this pull request Nov 3, 2026
CHANGELOG: the examples join the Added list; the units entry was already
under Changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013bsHH774XBx3sJCtfvvuGF
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