Test Report for Build #14: fixup! Always create report again #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Report | |
run-name: > | |
Test Report for ${{ github.event.workflow.name }} | |
#${{ github.event.workflow_run.run_number }}: | |
${{ github.event.workflow_run.display_title }} | |
on: | |
workflow_run: | |
workflows: [Build] | |
types: [completed] | |
# Permissions only have to be specified when set to be restricted by default. | |
# Otherwise, the workflow will have all necessary permissions by default. | |
# See https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token | |
permissions: | |
checks: write | |
# The documentation mentions that the following permissions is necessary to access other workflow runs. | |
# However, the workflow seems to work even without this permission. | |
# Maybe there is a special case which always allows access to the workflow run which triggered this run. | |
actions: read | |
jobs: | |
report: | |
name: Test Report | |
runs-on: ubuntu-latest | |
steps: | |
# We have to clone the repo as the test-reporter would run into an error otherwise. | |
# See https://github.com/dorny/test-reporter/issues/131#issuecomment-2093880211 | |
- name: Fetch Sources | |
uses: actions/checkout@v4 | |
# We have to manually download the artifact because dorny/test-reporter@v1 | |
# does not support artifacts uploaded by actions/upload-artifact@v4. | |
# See https://github.com/dorny/test-reporter/issues/343 | |
- name: Download Test Reports | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: test-results-* | |
run-id: ${{ github.event.workflow_run.id }} | |
github-token: ${{ github.token }} | |
- name: Publish Test Reports as Annotations | |
uses: dorny/test-reporter@v1 | |
with: | |
name: "Unit Tests Report" | |
path: "test-results-*/test-results/*/TEST-*.xml" | |
reporter: java-junit | |
fail-on-empty: false |