Skip to content

Commit ee3a3de

Browse files
ci: modernize artifact action (#482)
supersedes #450 supersedes #449 --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Jan Kowalleck <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent a4b25f5 commit ee3a3de

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.github/workflows/php-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
- cron: '42 23 * * 5'
2222

2323
concurrency:
24-
group: ${{ github.workflow }}-${{ github.ref }}
24+
group: '${{ github.workflow }}-${{ github.ref }}'
2525
cancel-in-progress: true
2626

2727
env:

.github/workflows/php.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
- cron: '42 23 * * 5'
1414

1515
concurrency:
16-
group: ${{ github.workflow }}-${{ github.ref }}
16+
group: '${{ github.workflow }}-${{ github.ref }}'
1717
cancel-in-progress: true
1818

1919
env:
@@ -43,7 +43,7 @@ jobs:
4343
- name: Validate composer.json and composer.lock
4444
run: composer validate --no-interaction
4545
phpunit:
46-
name: PHPUnit (${{ matrix.os}}, ${{ matrix.php }}, ${{ matrix.dependencies }})
46+
name: PHPUnit (${{ matrix.os}}, php${{ matrix.php }}, ${{ matrix.dependencies }})
4747
runs-on: ${{ matrix.os }}
4848
strategy:
4949
fail-fast: false
@@ -123,9 +123,9 @@ jobs:
123123
- name: Artifact reports
124124
if: ${{ ! cancelled() }}
125125
# see https://github.com/actions/upload-artifact
126-
uses: actions/upload-artifact@v3
126+
uses: actions/upload-artifact@v4
127127
with:
128-
name: ${{ env.TESTS_REPORTS_ARTIFACT }}
128+
name: '${{ env.TESTS_REPORTS_ARTIFACT }}_phpunit_${{ matrix.os }}_php${{ matrix.php }}_${{ matrix.dependencies }}'
129129
path: ${{ env.REPORTS_DIR }}
130130
if-no-files-found: error
131131
report-coverage:
@@ -136,14 +136,16 @@ jobs:
136136
steps:
137137
- name: fetch test artifacts
138138
# see https://github.com/actions/download-artifact
139-
uses: actions/download-artifact@v3
139+
uses: actions/download-artifact@v4
140140
with:
141-
name: ${{ env.TESTS_REPORTS_ARTIFACT }}
141+
pattern: '${{ env.TESTS_REPORTS_ARTIFACT }}_phpunit_*'
142+
merge-multiple: true
142143
path: ${{ env.REPORTS_DIR }}
143144
- name: Run codacy-coverage-reporter
144145
env:
145146
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
146-
if: ${{ env.CODACY_PROJECT_TOKEN != '' }} ## see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-secrets
147+
## see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-secrets
148+
if: ${{ env.CODACY_PROJECT_TOKEN != '' }}
147149
# see https://github.com/codacy/codacy-coverage-reporter-action
148150
uses: codacy/codacy-coverage-reporter-action@v1
149151
with:
@@ -218,14 +220,14 @@ jobs:
218220
--no-cache
219221
--long-progress
220222
--php-version='${{ matrix.php }}'
221-
--report='${{ env.REPORTS_DIR }}/psalm/php${{ matrix.php }}_${{ matrix.dependencies }}.junit.xml'
223+
--report='${{ env.REPORTS_DIR }}/psalm/p${{ matrix.php }}_c${{ matrix.composer }}_${{ matrix.dependencies }}.junit.xml'
222224
--stats
223225
- name: Artifact reports
224226
if: ${{ ! cancelled() }}
225227
# see https://github.com/actions/upload-artifact
226-
uses: actions/upload-artifact@v3
228+
uses: actions/upload-artifact@v4
227229
with:
228-
name: ${{ env.TYPES_REPORTS_ARTIFACT }}
230+
name: '${{ env.TYPES_REPORTS_ARTIFACT }}_psalm_p${{ matrix.php }}_c${{ matrix.composer }}_${{ matrix.dependencies }}'
229231
path: ${{ env.REPORTS_DIR }}
230232
if-no-files-found: error
231233
composer-unused:

0 commit comments

Comments
 (0)