1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Test Report
# Trigger ONLY after the CI workflow finishes
on:
workflow_run:
workflows:
types:
- completed
permissions:
contents: read
actions: read
checks: write # Required to create the Check Run
jobs:
report:
runs-on: ubuntu-latest
steps:
- name: Create Test Report
uses: dorny/test-reporter@v2
with:
# 1. ARTIFACT REGEX
# Automatically downloads artifacts matching this pattern from the 'Rust CI' workflow.
# It captures the group (.*) to use in the report name.
artifact: /test-results-(.*)/
# 2. DYNAMIC NAMING
# Uses the captured group ($1) to create separate reports for
# 'ubuntu-latest', 'windows-latest', etc.
name: 'Test Report ($1)'
# 3. PATH
# Where to look for XML files inside the downloaded artifact zip
path: '*.xml'
# 4. REPORTER
# Nextest produces JUnit style XML
reporter: java-junit
# 5. VISUALIZATION SETTINGS
# Generate a summary table in the "Summary" tab of the workflow run
use-actions-summary: 'true'
# Customize the badge title in the summary
badge-title: 'Test Results'
# List every single test suite and case, not just failed ones
list-suites: 'all'
list-tests: 'all'
# Maximize the number of code annotations (red squiggles in files)
max-annotations: '50'
# 6. ERROR HANDLING
# If the tests failed in CI, mark this Check Run as failed too
fail-on-error: 'true'
# If CI skipped tests (no code changes), don't fail this reporting step
fail-on-empty: 'false'
# Token required to write checks
token: ${{ secrets.GITHUB_TOKEN }}