fix(ci): align all projects on net9.0, upgrade actions to v5, enable VM tests

- Change test projects from net10.0 to net9.0 to match source projects
- Update build workflow from net8.0 to net9.0
- Upgrade checkout to v5, setup-dotnet to v5 across all workflows
- Remove outdated PS 7.2 test matrix entries
- Restructure integration tests: create test keeps VM alive so start/stop,
  snapshot, and cloud-init tests can use it instead of skipping. AfterAll
  handles cleanup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-18 16:59:43 -05:00
parent 8779dc5818
commit b64c34c8cd
7 changed files with 53 additions and 85 deletions
+8 -8
View File
@@ -18,27 +18,27 @@ jobs:
matrix:
include:
- os: ubuntu-latest
framework: net10.0
framework: net9.0
shell: pwsh
- os: windows-latest
framework: net10.0
framework: net9.0
shell: pwsh
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
dotnet-version: '9.0.x'
- name: Build mock server
run: dotnet build tests/PSProxmoxVE.MockServer/PSProxmoxVE.MockServer.csproj --configuration Release
- name: Build module
run: dotnet publish src/PSProxmoxVE/PSProxmoxVE.csproj --configuration Release --framework net10.0 --output ./publish/net10.0
run: dotnet publish src/PSProxmoxVE/PSProxmoxVE.csproj --configuration Release --framework net9.0 --output ./publish/net9.0
- name: Install Pester 5
shell: pwsh
@@ -50,7 +50,7 @@ jobs:
run: |
$modulePath = "$env:USERPROFILE\Documents\PowerShell\Modules\PSProxmoxVE"
New-Item -ItemType Directory -Path $modulePath -Force | Out-Null
Copy-Item -Path .\publish\net10.0\* -Destination $modulePath -Recurse -Force
Copy-Item -Path .\publish\net9.0\* -Destination $modulePath -Recurse -Force
- name: Copy module to module path (Linux)
if: matrix.os != 'windows-latest'
@@ -58,7 +58,7 @@ jobs:
run: |
$modulePath = "$HOME/.local/share/powershell/Modules/PSProxmoxVE"
New-Item -ItemType Directory -Path $modulePath -Force | Out-Null
Copy-Item -Path ./publish/net10.0/* -Destination $modulePath -Recurse -Force
Copy-Item -Path ./publish/net9.0/* -Destination $modulePath -Recurse -Force
- name: Run mock integration tests
shell: pwsh