Skip to content

ci(coverage): scope Test Coverage concurrency by ref (stop cross-PR cancellations)#333

Open
breimanntools wants to merge 1 commit into
masterfrom
fix/coverage-concurrency-ref
Open

ci(coverage): scope Test Coverage concurrency by ref (stop cross-PR cancellations)#333
breimanntools wants to merge 1 commit into
masterfrom
fix/coverage-concurrency-ref

Conversation

@breimanntools

Copy link
Copy Markdown
Owner

Problem

The Test Coverage workflow (test_coverage.yml) sets its concurrency group to ${{ github.workflow }} — the workflow name only, with no ${{ github.ref }}. That makes the group repo-global: with cancel-in-progress: true, a new run on any branch/PR cancels the in-progress runs of all others.

With several PRs open at once, only the newest run survives; every other PR's coverage run ends as a spurious cancelled (red ✗) and never reports a coverage number. (Confirmed: the failing checks conclude cancelled, killed during dependency install before any test ran — not a test or coverage failure.)

Fix

Add ${{ github.ref }} to the group so it is scoped per branch/PR:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

Now a new push to a branch only supersedes that branch's own in-progress run (still no stacked redundant runs on rapid pushes), while different branches/PRs no longer cancel each other — so every PR gets its own coverage result. Standard GitHub Actions pattern. The explanatory comment is updated to match.

Trade-off: with many active branches this permits more than one coverage run at a time (the previous config deliberately serialized the heaviest workflow repo-wide). That serialization is what caused the missing coverage on all-but-one PR, so per-ref scoping is the correct behavior for a multi-PR repo.

🤖 Generated with Claude Code

…ancellations)

The concurrency group was keyed on the workflow name only, making it repo-global:
with several PRs open, a new run anywhere cancelled all others, so only one PR ever
got a coverage number and every other PR's run showed a spurious 'cancelled' (red).
Add ${{ github.ref }} to the group so each branch/PR only supersedes its own
in-progress run; different branches no longer cancel each other.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.93%. Comparing base (1a152de) to head (cecafac).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #333   +/-   ##
=======================================
  Coverage   94.93%   94.93%           
=======================================
  Files         185      185           
  Lines       17883    17883           
  Branches     3038     3038           
=======================================
  Hits        16978    16978           
  Misses        598      598           
  Partials      307      307           
Components Coverage Δ
cpp_core 94.95% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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