@@ -89,21 +89,32 @@ jobs:
8989 - uses : taiki-e/install-action@v2
9090 with :
9191 tool : nextest
92- - name : " Test (nextest)"
92+ - name : Test (nextest)
9393 id : nextest
9494 env :
95- GIX_TEST_IGNORE_ARCHIVES : 1
95+ GIX_TEST_IGNORE_ARCHIVES : ' 1 '
9696 run : cargo nextest --profile=with-xml run --workspace --no-fail-fast
9797 continue-on-error : true
98- - name : Check how many tests failed
99- if : steps.nextest.outcome == 'failure'
100- env :
101- # See https://github.com/GitoxideLabs/gitoxide/issues/1358.
102- EXPECTED_FAILURE_COUNT : 14
98+ - name : Check for errors
99+ run : |
100+ [xml]$junit_xml = Get-Content -Path 'target/nextest/with-xml/junit.xml'
101+ if ($junit_xml.testsuites.errors -ne 0) { exit 1 }
102+ - name : Collect actual failures
103+ run : |
104+ [xml]$junit_xml = Get-Content -Path 'target/nextest/with-xml/junit.xml'
105+
106+ $actual_failures = $junit_xml.SelectNodes("//testcase[failure]") |
107+ ForEach-Object { "$($_.classname) $($_.name)" } |
108+ Sort-Object
109+
110+ Write-Output $actual_failures
111+ Set-Content -Path 'actual-failures.txt' -Value $actual_failures
112+ - name : Compare expected and actual failures
103113 run : |
104- [xml]$junit = Get-Content -Path 'target/nextest/with-xml/junit.xml'
105- if ($junit.testsuites.errors -ne 0) { exit 1 }
106- if ($junit.testsuites.failures -gt $env:EXPECTED_FAILURE_COUNT) { exit 1 }
114+ # Fail on any differences, even unexpectedly passing tests, so they can be investigated.
115+ # (If the job is made blocking for PRs, it may make sense to make this less stringent.)
116+ git --no-pager diff --no-index --exit-code --unified=1000000 --color=always -- `
117+ etc/test-fixtures-windows-expected-failures-see-issue-1358.txt actual-failures.txt
107118
108119 test-32bit :
109120 runs-on : ubuntu-latest
0 commit comments