fix(ci): fix xunit test, net48 build isolation, mock server check, Pester config

- Update BaseUrl test to expect trailing slash (matches code change)
- Revert upload-artifact to v4 (v5 doesn't exist yet)
- Build net48 job restores only src/test projects (excludes MockServer)
- MockServer.Tests.ps1: fix net10.0 -> net9.0 DLL paths, fix build check
- Unit tests: use New-PesterConfiguration instead of -CI flag (fixes
  AmbiguousParameterSet on PS 5.1), exclude MockIntegration tag

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-18 17:20:39 -05:00
parent b64c34c8cd
commit ec05e52e58
5 changed files with 33 additions and 10 deletions
+18 -2
View File
@@ -93,14 +93,30 @@ jobs:
shell: powershell
run: |
Import-Module Pester -MinimumVersion 5.0
Invoke-Pester tests/PSProxmoxVE.Tests -ExcludeTag Integration -CI -OutputFormat NUnitXml -OutputFile TestResults/pester-results.xml
$config = New-PesterConfiguration
$config.Run.Path = "tests/PSProxmoxVE.Tests"
$config.Run.Exit = $true
$config.Filter.ExcludeTag = @("Integration", "MockIntegration")
$config.Output.Verbosity = "Detailed"
$config.TestResult.Enabled = $true
$config.TestResult.OutputFormat = "NUnitXml"
$config.TestResult.OutputPath = "TestResults/pester-results.xml"
Invoke-Pester -Configuration $config
- name: Run Pester tests (PS 7.x)
if: matrix.ps_version != '5.1'
shell: pwsh
run: |
Import-Module Pester -MinimumVersion 5.0
Invoke-Pester tests/PSProxmoxVE.Tests -ExcludeTag Integration -CI -OutputFormat NUnitXml -OutputFile TestResults/pester-results.xml
$config = New-PesterConfiguration
$config.Run.Path = "tests/PSProxmoxVE.Tests"
$config.Run.Exit = $true
$config.Filter.ExcludeTag = @("Integration", "MockIntegration")
$config.Output.Verbosity = "Detailed"
$config.TestResult.Enabled = $true
$config.TestResult.OutputFormat = "NUnitXml"
$config.TestResult.OutputPath = "TestResults/pester-results.xml"
Invoke-Pester -Configuration $config
- name: Upload test results
if: always()