Skip to content

Commit ad71be5

Browse files
Update nightlybuild.yml
1 parent 48f6a21 commit ad71be5

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/nightlybuild.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,20 @@ jobs:
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

4861
- uses: actions/[email protected]
4962
if: ${{ failure() }}

0 commit comments

Comments
 (0)