Skip to content

Commit

Permalink
ci: modernize artifact action (#482)
Browse files Browse the repository at this point in the history
supersedes #450
supersedes #449

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
jkowalleck and dependabot[bot] authored Apr 30, 2024
1 parent a4b25f5 commit ee3a3de
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
- cron: '42 23 * * 5'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: '${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true

env:
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- cron: '42 23 * * 5'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: '${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true

env:
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Validate composer.json and composer.lock
run: composer validate --no-interaction
phpunit:
name: PHPUnit (${{ matrix.os}}, ${{ matrix.php }}, ${{ matrix.dependencies }})
name: PHPUnit (${{ matrix.os}}, php${{ matrix.php }}, ${{ matrix.dependencies }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -123,9 +123,9 @@ jobs:
- name: Artifact reports
if: ${{ ! cancelled() }}
# see https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.TESTS_REPORTS_ARTIFACT }}
name: '${{ env.TESTS_REPORTS_ARTIFACT }}_phpunit_${{ matrix.os }}_php${{ matrix.php }}_${{ matrix.dependencies }}'
path: ${{ env.REPORTS_DIR }}
if-no-files-found: error
report-coverage:
Expand All @@ -136,14 +136,16 @@ jobs:
steps:
- name: fetch test artifacts
# see https://github.com/actions/download-artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.TESTS_REPORTS_ARTIFACT }}
pattern: '${{ env.TESTS_REPORTS_ARTIFACT }}_phpunit_*'
merge-multiple: true
path: ${{ env.REPORTS_DIR }}
- name: Run codacy-coverage-reporter
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
if: ${{ env.CODACY_PROJECT_TOKEN != '' }} ## see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-secrets
## see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-secrets
if: ${{ env.CODACY_PROJECT_TOKEN != '' }}
# see https://github.com/codacy/codacy-coverage-reporter-action
uses: codacy/codacy-coverage-reporter-action@v1
with:
Expand Down Expand Up @@ -218,14 +220,14 @@ jobs:
--no-cache
--long-progress
--php-version='${{ matrix.php }}'
--report='${{ env.REPORTS_DIR }}/psalm/php${{ matrix.php }}_${{ matrix.dependencies }}.junit.xml'
--report='${{ env.REPORTS_DIR }}/psalm/p${{ matrix.php }}_c${{ matrix.composer }}_${{ matrix.dependencies }}.junit.xml'
--stats
- name: Artifact reports
if: ${{ ! cancelled() }}
# see https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.TYPES_REPORTS_ARTIFACT }}
name: '${{ env.TYPES_REPORTS_ARTIFACT }}_psalm_p${{ matrix.php }}_c${{ matrix.composer }}_${{ matrix.dependencies }}'
path: ${{ env.REPORTS_DIR }}
if-no-files-found: error
composer-unused:
Expand Down

0 comments on commit ee3a3de

Please sign in to comment.