Skip to content

Commit c78d4a2

Browse files
committed
Avoid cancelling in-progress conformance runs on main
## Motivation and Context When two PRs are merged to main in quick succession, the Conformance Tests run for the earlier merge commit is cancelled by the run for the later one. On push events, `github.ref` is always `refs/heads/main`, so every merge to main shares the same concurrency group and `cancel-in-progress: true` cancels all but the latest run. As a result, only the last merged PR gets a conformance result. This change appends `github.sha` to the concurrency group for push events so that each merge commit runs independently. For pull_request events the SHA part is empty, keeping the existing behavior where pushing new commits to a PR cancels its superseded runs. ## How Has This Been Tested? Validated the workflow YAML syntax locally. The concurrent behavior itself can only be observed on GitHub Actions, by confirming that both Conformance Tests runs complete when two pushes land on main within a short interval. ## Breaking Changes None.
1 parent cc219a2 commit c78d4a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/conformance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88

99
concurrency:
10-
group: conformance-${{ github.ref }}
10+
group: conformance-${{ github.ref }}-${{ github.event_name == 'push' && github.sha || '' }}
1111
cancel-in-progress: true
1212

1313
permissions:

0 commit comments

Comments
 (0)