File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 4343 run : docker build . --file TransactionProcessor/Dockerfile --tag transactionprocessor:latest
4444
4545 - name : Run Integration Tests
46- run : dotnet test "TransactionProcessor.IntegrationTests\TransactionProcessor.IntegrationTests.csproj"
46+ run : dotnet test "TransactionProcessor.IntegrationTests\TransactionProcessor.IntegrationTests.csproj" --logger "trx;LogFileName=test-results.trx"
47+
48+ - name : Extract Failed Tests (PowerShell)
49+ if : ${{ failure() }}
50+ run : |
51+ $xml = [xml](Get-Content test-results.trx)
52+ $failedTests = $xml.TestRun.Results.UnitTestResult | Where-Object { $_.outcome -eq "Failed" }
53+ if ($failedTests) {
54+ Write-Host "::error::Failed Tests:"
55+ foreach ($test in $failedTests) {
56+ Write-Host "::error::- $($test.testName)"
57+ }
58+ }
59+ shell : pwsh
4760
48614962 if : ${{ failure() }}
You can’t perform that action at this time.
0 commit comments