fix(ci): unset DOTNET_ROOT for Pester steps, add 15min timeout

The setup-dotnet action sets DOTNET_ROOT which overrides PS 7.x's
bundled .NET runtime for assembly resolution, causing System.Runtime
9.0.0.0 FileNotFoundException. Unsetting it for Pester steps lets PS
use its own runtime.

Also adds timeout-minutes: 15 to prevent runaway jobs from consuming
Actions minutes (PS 5.1 job was hanging for 5+ hours).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-19 08:41:43 -05:00
parent 8d268aee61
commit 6871bef77d
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -201,6 +201,8 @@ jobs:
- name: Run integration tests
shell: pwsh
env:
DOTNET_ROOT: ''
DOTNET_MULTILEVEL_LOOKUP: ''
PVETEST_HOST: ${{ steps.target.outputs.host }}
PVETEST_PORT: ${{ steps.target.outputs.port }}
PVETEST_APITOKEN: ${{ steps.target.outputs.token }}
+4
View File
@@ -8,6 +8,7 @@ on:
jobs:
pester-tests:
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
@@ -110,6 +111,9 @@ jobs:
- name: Run Pester tests (PS 7.x)
if: matrix.ps_version != '5.1'
shell: pwsh
env:
DOTNET_ROOT: ''
DOTNET_MULTILEVEL_LOOKUP: ''
run: |
Import-Module Pester -MinimumVersion 5.0
$config = New-PesterConfiguration