Skip to content

Commit

Permalink
chore: modify test report condition
Browse files Browse the repository at this point in the history
  • Loading branch information
filzrev committed Oct 23, 2024
1 parent 5683814 commit c923f8e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ permissions:
jobs:
report:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: Create Test Report
uses: dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5 # v1.9.1
Expand All @@ -24,13 +25,13 @@ jobs:
name: test-results # Name of the `check run` which will be created
path: 'test/TestResults/*.trx'
reporter: dotnet-trx
fail-on-error: true
fail-on-error: false
fail-on-empty: false

- name: Output message to job summary
id: output-job-summary
shell: pwsh
if: ${{ !cancelled() && (steps.test-reports.outputs.time != '0') }}
if: ${{ steps.test-reports.outputs.time != '0' }}
run: |
$conclusion = "${{ steps.test-reports.outputs.conclusion }}"
$passed = "${{ steps.test-reports.outputs.passed }}"
Expand All @@ -50,3 +51,8 @@ jobs:
"@
Write-Output $content >> $env:GITHUB_STEP_SUMMARY
if($failed -ne '0'){
echo "::error::Test Report contains ${failed} errors."
exit 1
}

0 comments on commit c923f8e

Please sign in to comment.