Separate publishing of test results for PRs from forks

This commit is contained in:
Mark McDowall 2024-01-12 08:56:45 -08:00 committed by GitHub
parent b8964f8bba
commit 02e051580c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 4 deletions

View File

@ -79,10 +79,9 @@ runs:
shell: bash shell: bash
run: dotnet test ./_tests/Sonarr.*.Test.dll --filter "${{ inputs.filter }}" --logger trx --results-directory "${{ env.RESULTS_NAME }}" run: dotnet test ./_tests/Sonarr.*.Test.dll --filter "${{ inputs.filter }}" --logger trx --results-directory "${{ env.RESULTS_NAME }}"
- name: Publish Test Results - name: Upload Test Results
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: phoenix-actions/test-reporting@v12 uses: actions/upload-artifact@v4
with: with:
name: ${{ env.RESULTS_NAME }} name: results-${{ env.RESULTS_NAME }}
path: ${{ env.RESULTS_NAME }}/*.trx path: ${{ env.RESULTS_NAME }}/*.trx
reporter: dotnet-trx

View File

@ -0,0 +1,24 @@
name: Publish Test Results
on:
workflow_run:
workflows: ['Build']
types:
- completed
permissions:
contents: read
actions: read
checks: write
jobs:
report:
runs-on: ubuntu-latest
steps:
- name: Publish Test Results
uses: phoenix-actions/test-reporting@v12
with:
artifact: /results-(.*)/
name: '$1'
path: '*.trx'
reporter: dotnet-trx