Skip to content

Commit 58626f1

Browse files
Update test-report.yml
1 parent 50259ea commit 58626f1

1 file changed

Lines changed: 11 additions & 20 deletions

File tree

.github/workflows/test-report.yml

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,30 @@ permissions:
1212
checks: write
1313

1414
jobs:
15-
discover:
16-
runs-on: ubuntu-latest
17-
outputs:
18-
head_branch: ${{ steps.meta.outputs.branch }}
19-
head_sha: ${{ steps.meta.outputs.sha }}
20-
steps:
21-
- id: meta
22-
run: |
23-
echo "branch=${{ github.event.workflow_run.head_branch }}" >> "$GITHUB_OUTPUT"
24-
echo "sha=${{ github.event.workflow_run.head_sha }}" >> "$GITHUB_OUTPUT"
2515
report:
26-
needs: discover
2716
runs-on: ubuntu-latest
2817
steps:
29-
# Checkout **the same commit** that the Test job ran on
18+
# Optional: checkout the exact commit the Test job ran on
3019
- name: Checkout code @ tested SHA
3120
uses: actions/checkout@v4
3221
with:
3322
fetch-depth: 0
34-
ref: ${{ needs.discover.outputs.head_sha }}
23+
ref: ${{ github.event.workflow_run.head_sha }}
3524

36-
# Optional: sanity listing of what GitHub auto-downloaded
37-
- name: Show downloaded artifacts
38-
run: ls -R
25+
# 🔍 Debug – list any .trx files that GitHub auto-downloaded
26+
- name: List workspace before reporter
27+
run: |
28+
echo "Listing *.trx we have so far:"
29+
find . -maxdepth 4 -type f -name '*.trx' -print || true
3930
40-
# 📊 Publish report — let the action pull both artifacts
41-
- name: Generate combined test report
31+
# 📊 Generate combined report (matches both framework artifacts)
32+
- name: Publish test report
4233
uses: dorny/test-reporter@v1
4334
with:
44-
# regex matches both test-results-net8.0 and test-results-net9.0
35+
# Regex matches test-results-net8.0 and test-results-net9.0
4536
artifact: /test-results-net[89]\.0/
4637
name: "Unit Tests (.NET 8 & 9)"
47-
path: '**/*.trx'
38+
path: '**/*.trx' # look inside both artifact zips
4839
reporter: dotnet-trx
4940
fail-on-error: false
5041
fail-on-empty: false

0 commit comments

Comments
 (0)