Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/pr-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,22 @@ on:
# Each job opts into only the scopes it needs.
permissions: {}

# Concurrency is resolved at run creation, before the job `if:` is evaluated, so
# a run that will skip (e.g. an ordinary PR comment) would otherwise cancel the
# real in-flight run. Runs that will not do any work get their own unique group
# (keyed on run_id) and cancel nothing; only runs that will actually execute
# share the per-PR group, so a new push still supersedes a stale wait.
# The predicate below mirrors the `coverage-report` job `if:` — keep them in sync.
concurrency:
group: pr-coverage-${{ github.event.pull_request.number || github.event.issue.number }}
group: >-
pr-coverage-${{ github.event.pull_request.number || github.event.issue.number }}${{
!((github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request != null &&
startsWith(github.event.comment.body, '/coverage') &&
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)))
&& format('-noop-{0}', github.run_id) || '' }}
cancel-in-progress: true

env:
Expand Down