File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 3232
3333 - name : Build Docker Image
3434 run : docker build . --file TransactionProcessor/Dockerfile --tag transactionprocessor:latest
35-
35+
3636 - name : Run Integration Tests
37- run : dotnet test "TransactionProcessor.IntegrationTests\TransactionProcessor.IntegrationTests.csproj" --filter Category=PRTest
37+ run : dotnet test "TransactionProcessor.IntegrationTests\TransactionProcessor.IntegrationTests.csproj" --filter Category=PRTest --logger "trx;LogFileName=test-results.trx"
38+
39+ - name : Extract Failed Tests (PowerShell)
40+ if : ${{ failure() }}
41+ run : |
42+ $xml = [xml](Get-Content test-results.trx)
43+ $failedTests = $xml.TestRun.Results.UnitTestResult | Where-Object { $_.outcome -eq "Failed" }
44+ if ($failedTests) {
45+ Write-Host "::error::Failed Tests:"
46+ foreach ($test in $failedTests) {
47+ Write-Host "::error::- $($test.testName)"
48+ }
49+ }
50+ shell : pwsh
3851
39524053 if : ${{ failure() }}
You can’t perform that action at this time.
0 commit comments