Skip to content

Commit 40c7a43

Browse files
authored
Merge pull request #710 from PHPCSStandards/feature/ghactions-dont-cancel-in-progress-main-branches
GH Actions/test: allow concurrency for build against "main" branches
2 parents a480170 + 9ed4ae8 commit 40c7a43

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ on:
1414
# Allow manually triggering the workflow.
1515
workflow_dispatch:
1616

17-
# Cancels all previous workflow runs for the same branch that have not yet completed.
17+
# Cancels all previous workflow runs for the same branch that have not yet completed,
18+
# but don't cancel when it's one of the "main" branches as that prevents
19+
# accurate monitoring of code coverage.
1820
concurrency:
1921
# The concurrency group contains the workflow name and the branch name.
2022
group: ${{ github.workflow }}-${{ github.ref }}
21-
cancel-in-progress: true
23+
cancel-in-progress: ${{ github.ref_name != 'master' && github.ref_name != '4.0' }}
2224

2325
jobs:
2426
build:

0 commit comments

Comments
 (0)