@@ -405,6 +405,53 @@ jobs:
405405 retention-days : 1
406406 compression-level : 0
407407
408+ windows-service-e2e :
409+ name : Test Windows native service lifecycle
410+ needs : windows-build
411+ runs-on : windows-latest
412+ timeout-minutes : 20
413+ steps :
414+ - uses : actions/checkout@v7
415+
416+ - name : Download Windows nextest archive
417+ uses : actions/download-artifact@v7
418+ with :
419+ name : windows-nextest-archive
420+ path : ${{ runner.temp }}
421+
422+ - name : Run Windows native service E2E
423+ shell : pwsh
424+ run : |
425+ $ErrorActionPreference = "Stop"
426+ $archive = Join-Path $env:RUNNER_TEMP "nextest-archive.tar.zst"
427+ $extractRoot = Join-Path $env:RUNNER_TEMP "windows-service-e2e"
428+ New-Item -ItemType Directory -Path $extractRoot -Force | Out-Null
429+ & 7z.exe x $archive "-o$extractRoot" -y -bso0 -bsp0
430+ if ($LASTEXITCODE -ne 0) {
431+ throw "7-Zip failed to decompress $archive"
432+ }
433+ $tar = Join-Path $extractRoot "nextest-archive.tar"
434+ & 7z.exe x $tar "-o$extractRoot" -y -bso0 -bsp0
435+ if ($LASTEXITCODE -ne 0) {
436+ throw "7-Zip failed to extract $tar"
437+ }
438+ $binaries = @(
439+ Get-ChildItem -LiteralPath $extractRoot -Recurse -File -Filter tracedecay.exe |
440+ Where-Object { $_.FullName -notmatch '[\\/]deps[\\/]' }
441+ )
442+ if ($binaries.Count -ne 1) {
443+ throw "expected exactly one non-deps tracedecay.exe; found $($binaries.Count): $($binaries.FullName -join ', ')"
444+ }
445+ $binary = $binaries[0].FullName
446+ & ./scripts/windows-service-e2e.ps1 -TraceDecayExe $binary
447+ if ($LASTEXITCODE -ne 0) {
448+ throw "Windows service E2E exited $LASTEXITCODE"
449+ }
450+
451+ - name : Clean abandoned Windows test children
452+ if : always()
453+ uses : ./.github/actions/clean-windows-test-children
454+
408455 windows-test-shard :
409456 name : Test Windows shard ${{ matrix.partition }}/5
410457 needs : windows-build
@@ -536,17 +583,21 @@ jobs:
536583 windows-test :
537584 name : Test Windows
538585 if : ${{ !cancelled() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository || contains(fromJSON('["master","feature/holographic-memory"]'), github.event.pull_request.base.ref)) }}
539- needs : windows-test-shard
586+ needs : [ windows-test-shard, windows-service-e2e]
540587 runs-on : ubuntu-latest
541588 steps :
542- - name : Check Windows shards
589+ - name : Check Windows jobs
543590 run : |
544591 set -euo pipefail
545592 if [ "${{ needs.windows-test-shard.result }}" != "success" ]; then
546593 echo "Windows shard result: ${{ needs.windows-test-shard.result }}"
547594 exit 1
548595 fi
549- echo "All Windows shards passed."
596+ if [ "${{ needs.windows-service-e2e.result }}" != "success" ]; then
597+ echo "Windows service E2E result: ${{ needs.windows-service-e2e.result }}"
598+ exit 1
599+ fi
600+ echo "All Windows jobs passed."
550601
551602 windows-platform-acceptance :
552603 name : Windows platform acceptance
0 commit comments