Skip to content

Commit

Permalink
Fix test report job
Browse files Browse the repository at this point in the history
  • Loading branch information
skrysmanski committed Mar 9, 2024
1 parent 8331058 commit 95c7f35
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,17 @@ jobs:
checks: write

steps:
# See: https://github.com/marketplace/actions/download-a-build-artifact
#
# The dorny/test-reporter@v1.8.0 action doesn't support actions/upload-artifact@v4 yet.
# We therefore download the artifact manually and feed it to test-reporter as local files.
# See: https://github.com/dorny/test-reporter/issues/363
- name: Download test results
uses: actions/download-artifact@v4
with:
pattern: test-results-*
path: test-results

# See: https://github.com/marketplace/actions/test-reporter
- name: Create test report
# For pinned versions, see: https://blog.gitguardian.com/github-actions-security-cheat-sheet/#use-specific-action-version-tags
Expand All @@ -166,15 +177,16 @@ jobs:
# test report if they pile up due to bug https://github.com/dorny/test-reporter/issues/67.
# See top of this file for more details.
name: 'Test Report #${{ github.run_number }}'
# The name of the artifact (minus extension) created by the CI workflow.
artifact: /test-results-(.*)/
# Path to test results (inside artifact .zip)
path: '**/*.trx'
# Path to test results (downloaded in previous step)
path: 'test-results/**/*.trx'
# Format of test results
reporter: dotnet-trx
# Don't mark the test report generated as failed if there's a failed test.
# Only mark it as failed if something with the workflow has actually gone wrong.
fail-on-error: false
# Workaround for error 'fatal: not a git repository' caused by a call to 'git ls-files'
# See: https://github.com/dorny/test-reporter/issues/169#issuecomment-1583560458
max-annotations: 0


#
Expand Down

0 comments on commit 95c7f35

Please sign in to comment.