mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-07 15:52:20 -04:00
ci(release): kill and name hung Windows tests in the release build
The release workflow is the only hosted job that runs the Core, Engine, IO and Server suites on Windows, and it had no hang guard: a silent test would hold the runner until the 30-minute cap with no clue which test hung. Apply the guard the windows-desktop CI job already uses: --blame-hang-timeout 5m with a mini dump, and upload all of TestResults rather than only the TRX files. The suites have roughly doubled since the last release run (7.5 min), so raise the job cap to 45 minutes. Validated with actionlint.
This commit is contained in:
1 parent
3a8419e6e9
commit
1b5a6bf6da
2 files changed
+12
-5
No files matched your search
@@ -17,7 +17,9 @@ permissions:
|
||||
jobs:
|
||||
windows:
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 30
|
||||
# The suites have roughly doubled since the v0.3.0 run (7.5 min); the hang
|
||||
# guard below names a stuck test long before this cap.
|
||||
timeout-minutes: 45
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
@@ -48,12 +50,15 @@ jobs:
|
||||
dotnet build OpenNest.sln -c Release
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Solution build failed.' }
|
||||
- name: Run all test projects on Windows
|
||||
# A test silent for 5 minutes is killed and named in the log, with a
|
||||
# mini dump in TestResults, instead of holding the runner until the
|
||||
# job timeout.
|
||||
run: |
|
||||
foreach ($project in @('OpenNest.Tests', 'OpenNest.Engine.Tests', 'OpenNest.IO.Tests', 'OpenNest.Server.Tests', 'OpenNest.WinForms.Tests', 'OpenNest.FrontEnd.Tests')) {
|
||||
dotnet test "$project/$project.csproj" -c Release --no-build --logger "trx;LogFileName=$project.trx" --results-directory TestResults
|
||||
dotnet test "$project/$project.csproj" -c Release --no-build --blame-hang-timeout 5m --blame-hang-dump-type mini --logger "trx;LogFileName=$project.trx" --results-directory TestResults
|
||||
if ($LASTEXITCODE -ne 0) { throw "$project failed." }
|
||||
}
|
||||
dotnet test OpenNest.Tests/OpenNest.Tests.csproj -c Debug --logger 'trx;LogFileName=OpenNest.Tests.Debug.trx' --results-directory TestResults
|
||||
dotnet test OpenNest.Tests/OpenNest.Tests.csproj -c Debug --blame-hang-timeout 5m --blame-hang-dump-type mini --logger 'trx;LogFileName=OpenNest.Tests.Debug.trx' --results-directory TestResults
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Debug tests failed.' }
|
||||
- name: Publish and verify Windows package
|
||||
run: ./scripts/Publish-Windows.ps1 -Version $env:RELEASE_VERSION
|
||||
@@ -85,6 +90,6 @@ jobs:
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
name: windows-test-results
|
||||
path: TestResults/*.trx
|
||||
path: TestResults/
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
Reference in new issue
Block a user