|
14 | 14 | # Allow manually triggering the workflow. |
15 | 15 | workflow_dispatch: |
16 | 16 |
|
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. |
20 | | -concurrency: |
21 | | - # The concurrency group contains the workflow name and the branch name. |
22 | | - group: ${{ github.workflow }}-${{ github.ref }} |
23 | | - cancel-in-progress: ${{ github.ref_name != 'master' && github.ref_name != '4.0' }} |
24 | | - |
25 | 17 | jobs: |
26 | 18 | build: |
| 19 | + # Cancels all previous runs of this particular job for the same branch that have not yet completed. |
| 20 | + concurrency: |
| 21 | + # The concurrency group contains the workflow name, job name and the branch name. |
| 22 | + group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} |
| 23 | + cancel-in-progress: true |
| 24 | + |
27 | 25 | runs-on: ubuntu-latest |
28 | 26 | name: "Build Phar on PHP: 8.0" |
29 | 27 |
|
|
82 | 80 | run: php phpcbf.phar ./scripts |
83 | 81 |
|
84 | 82 | test: |
| 83 | + # Cancels all previous runs of this particular job for the same branch that have not yet completed. |
| 84 | + concurrency: |
| 85 | + # The concurrency group contains the workflow name, job name, job index and the branch name. |
| 86 | + group: ${{ github.workflow }}-${{ github.job }}-${{ strategy.job-index }}-${{ github.ref }} |
| 87 | + cancel-in-progress: true |
| 88 | + |
85 | 89 | runs-on: ubuntu-latest |
86 | 90 | needs: build |
87 | 91 |
|
@@ -215,6 +219,8 @@ jobs: |
215 | 219 | run: php phpcs.phar |
216 | 220 |
|
217 | 221 | coverage: |
| 222 | + # Explicitly *NOT* setting "concurrency" for this job to allow for monitoring code coverage for all merges. |
| 223 | + |
218 | 224 | runs-on: ${{ matrix.os }} |
219 | 225 |
|
220 | 226 | strategy: |
@@ -256,8 +262,8 @@ jobs: |
256 | 262 | shell: bash |
257 | 263 | run: | |
258 | 264 | # Set the "short_open_tag" ini to make sure specific conditions are tested. |
259 | | - if [[ ${{ matrix.custom_ini }} == true && "${{ matrix.php }}" == '7.2' ]]; then |
260 | | - echo 'PHP_INI=, date.timezone=Australia/Sydney, short_open_tag=On' >> "$GITHUB_OUTPUT" |
| 265 | + if [[ ${{ matrix.custom_ini }} == true && "${{ matrix.php }}" == '7.2' ]]; then |
| 266 | + echo 'PHP_INI=, date.timezone=Australia/Sydney, short_open_tag=On' >> "$GITHUB_OUTPUT" |
261 | 267 | fi |
262 | 268 |
|
263 | 269 | - name: Install PHP |
|
0 commit comments