Fix CI test report workflow

This commit is contained in:
Dan Balasescu 2024-11-07 18:15:54 +09:00
parent 35397d90af
commit 233560b867
No known key found for this signature in database
1 changed files with 22 additions and 15 deletions

View File

@ -8,30 +8,37 @@ on:
workflows: [ "Continuous Integration" ] workflows: [ "Continuous Integration" ]
types: types:
- completed - completed
permissions: {}
permissions:
contents: read
actions: read
checks: write
jobs: jobs:
annotate: annotate:
permissions:
checks: write # to create checks (dorny/test-reporter)
name: Annotate CI run with test results name: Annotate CI run with test results
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion != 'cancelled' }} if: ${{ github.event.workflow_run.conclusion != 'cancelled' }}
strategy:
fail-fast: false
matrix:
os:
- { prettyname: Windows }
- { prettyname: macOS }
- { prettyname: Linux }
threadingMode: ['SingleThread', 'MultiThreaded']
timeout-minutes: 5 timeout-minutes: 5
steps: steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.workflow_run.repository.full_name }}
ref: ${{ github.event.workflow_run.head_sha }}
- name: Download results
uses: actions/download-artifact@v4
with:
pattern: osu-test-results-*
merge-multiple: true
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}
- name: Annotate CI run with test results - name: Annotate CI run with test results
uses: dorny/test-reporter@v1.8.0 uses: dorny/test-reporter@v1.8.0
with: with:
artifact: osu-test-results-${{matrix.os.prettyname}}-${{matrix.threadingMode}} name: Results
name: Test Results (${{matrix.os.prettyname}}, ${{matrix.threadingMode}})
path: "*.trx" path: "*.trx"
reporter: dotnet-trx reporter: dotnet-trx
list-suites: 'failed' list-suites: 'failed'