@@ -102,10 +102,10 @@ jobs:
102102 overwrite : true
103103
104104 report :
105- runs-on : ubuntu-latest
106- needs : test
107-
108- steps :
105+ runs-on : ubuntu-latest
106+ needs : test
107+
108+ steps :
109109 - name : Download .NET 9.0 Test Results
110110 uses : actions/download-artifact@v4
111111 with :
@@ -124,18 +124,28 @@ jobs:
124124 fetch-depth : 0
125125
126126 - name : Generate Test Report (.NET 9.0)
127- uses : dorny/test-reporter@v1
128127 if : success() || failure()
129- with :
130- name : Test Results (.NET 9.0)
131- path : ./TestResults/net9.0/**/*.trx
132- reporter : dotnet-trx
128+ run : |
129+ if compgen -G "./TestResults/net9.0/**/*.trx" > /dev/null; then
130+ echo "Running test report for .NET 9.0"
131+ npx --yes dorny/test-reporter@v1 \
132+ --name "Test Results (.NET 9.0)" \
133+ --path "./TestResults/net9.0/**/*.trx" \
134+ --reporter dotnet-trx
135+ else
136+ echo "⚠️ No .NET 9.0 test results found, skipping."
137+ fi
133138
134139 - name : Generate Test Report (.NET 8.0)
135- uses : dorny/test-reporter@v1
136140 if : success() || failure()
137- with :
138- name : Test Results (.NET 8.0)
139- path : ./TestResults/net8.0/**/*.trx
140- reporter : dotnet-trx
141+ run : |
142+ if compgen -G "./TestResults/net8.0/**/*.trx" > /dev/null; then
143+ echo "Running test report for .NET 8.0"
144+ npx --yes dorny/test-reporter@v1 \
145+ --name "Test Results (.NET 8.0)" \
146+ --path "./TestResults/net8.0/**/*.trx" \
147+ --reporter dotnet-trx
148+ else
149+ echo "⚠️ No .NET 8.0 test results found, skipping."
150+ fi
141151
0 commit comments