Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,27 @@ jobs:
shell: pwsh
run: ./pwsh/tools/install-powershell.ps1 -Preview -Destination ./preview

- name: Install ProcDump for Windows PowerShell hang dumps
if: runner.os == 'Windows'
shell: pwsh
run: |
# VSTest's built-in hang dumper only handles .NET Core test hosts, so
# capturing a dump of a wedged .NET Framework (net462 / Windows
# PowerShell 5.1) test host requires ProcDump, which isn't on the
# runner image. Install is best-effort: a failure must not fail CI
# (the net8 legs dump without it, and `--blame-hang` still terminates
# the host and writes a sequence file naming the hung test). See #2323.
try {
$zip = Join-Path $env:RUNNER_TEMP 'Procdump.zip'
$dir = Join-Path $env:RUNNER_TEMP 'procdump'
Invoke-WebRequest -Uri 'https://download.sysinternals.com/files/Procdump.zip' -OutFile $zip
Expand-Archive -Path $zip -DestinationPath $dir -Force
"PROCDUMP_PATH=$dir" | Out-File -FilePath $env:GITHUB_ENV -Append
Write-Host "ProcDump installed to $dir"
} catch {
Write-Warning "ProcDump install failed; net462 hang dumps will be unavailable: $_"
}

- name: Build and test
shell: pwsh
run: Invoke-Build -Configuration Release TestFull
Expand Down Expand Up @@ -79,4 +100,7 @@ jobs:
if: always()
with:
name: PowerShellEditorServices-test-results-${{ matrix.os }}
path: '**/*.trx'
path: |
**/*.trx
**/*.dmp
**/*_Sequence.xml
5 changes: 5 additions & 0 deletions PowerShellEditorServices.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ $script:dotnetBuildArgs = @(

$script:dotnetTestArgs = @("test") + $script:dotnetBuildArgs + $TestArgs + @(
if ($TestFilter) { "--filter", $TestFilter }
# In CI, collect a hang dump and fail fast if any single test wedges instead
# of riding the job's `timeout-minutes` cap blind. The Windows PowerShell 5.1
# (net462) unit leg intermittently hangs under the 20260614 runner image; the
# dump names the offending test and captures its stacks. See #2323.
if ($env:GITHUB_ACTIONS) { "--blame-hang", "--blame-hang-timeout", "10m", "--blame-hang-dump-type", "full" }
"--framework"
)

Expand Down
Loading