1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-03-05 13:20:20 -05:00

Use GitHubActionsTestLogger for test reporting

This commit is contained in:
Mark McDowall
2024-02-18 20:32:43 -08:00
committed by Mark McDowall
parent 7a768b5d0f
commit 0242b40eda
12 changed files with 21 additions and 51 deletions

View File

@@ -77,7 +77,7 @@ runs:
- name: Run tests
shell: bash
run: dotnet test ./_tests/Sonarr.*.Test.dll --filter "${{ inputs.filter }}" --logger "trx;LogFileName=${{ env.RESULTS_NAME }}.trx"
run: dotnet test ./_tests/Sonarr.*.Test.dll --filter "${{ inputs.filter }}" --logger "trx;LogFileName=${{ env.RESULTS_NAME }}.trx" --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"
- name: Upload Test Results
if: ${{ !cancelled() }}
@@ -85,12 +85,3 @@ runs:
with:
name: results-${{ env.RESULTS_NAME }}
path: TestResults/*.trx
- name: Publish Test Results
uses: phoenix-actions/test-reporting@v12
with:
name: Test Results
output-to: step-summary
path: '*.trx'
reporter: dotnet-trx
working-directory: TestResults

View File

@@ -1,41 +0,0 @@
name: Publish Test Results
on:
workflow_run:
workflows: ['Build']
types:
- completed
permissions:
contents: read
actions: read
checks: write
jobs:
report:
if: ${{ github.event.workflow_run.conclusion != 'skipped' && github.event.workflow_run.conclusion != 'cancelled' }}
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Download Test Reports
uses: actions/download-artifact@v4
with:
path: test-results
pattern: results-*
merge-multiple: true
repository: ${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Test Results
uses: phoenix-actions/test-reporting@v12
with:
list-suites: failed
list-tests: failed
name: Test Results
only-summary: true
path: '*.trx'
reporter: dotnet-trx
working-directory: test-results