mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-17 08:47:47 +00:00
fix(ci): restore GitHub-hosted runners with deps.json and DOTNET_ROOT fixes
Reverts to GitHub-hosted runner matrix (Windows PS 5.1/7.5, Ubuntu, macOS) with the two critical fixes that resolve System.Runtime 9.0.0.0 assembly loading on PS 7.x: 1. Remove PSProxmoxVE.deps.json from publish output (prevents .NET dependency resolution conflicts with PS's bundled runtime) 2. Unset DOTNET_ROOT/DOTNET_MULTILEVEL_LOOKUP in Pester steps (prevents setup-dotnet from overriding PS's assembly resolution) Both fixes validated in Docker (705/705 tests pass). Adds timeout-minutes: 15 to all jobs to prevent runaway billing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+41
-16
@@ -7,28 +7,53 @@ on:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: [self-hosted, proxmox, integration]
|
||||
build-net48:
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 15
|
||||
container:
|
||||
image: mcr.microsoft.com/dotnet/sdk:9.0
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: '9.0.x'
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build net9.0
|
||||
run: dotnet build --configuration Release --framework net9.0 --no-restore
|
||||
|
||||
- name: Test net9.0
|
||||
run: dotnet test tests/PSProxmoxVE.Core.Tests/PSProxmoxVE.Core.Tests.csproj --configuration Release --framework net9.0 --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
|
||||
|
||||
run: |
|
||||
dotnet restore src/PSProxmoxVE/PSProxmoxVE.csproj
|
||||
dotnet restore tests/PSProxmoxVE.Core.Tests/PSProxmoxVE.Core.Tests.csproj
|
||||
- name: Build net48
|
||||
run: |
|
||||
dotnet build src/PSProxmoxVE/PSProxmoxVE.csproj --configuration Release --framework net48 --no-restore
|
||||
dotnet build tests/PSProxmoxVE.Core.Tests/PSProxmoxVE.Core.Tests.csproj --configuration Release --framework net48 --no-restore
|
||||
- name: Test net48
|
||||
run: dotnet test tests/PSProxmoxVE.Core.Tests/PSProxmoxVE.Core.Tests.csproj --configuration Release --framework net48 --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
|
||||
- name: Upload coverage
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage-net9
|
||||
name: coverage-net48
|
||||
path: ./coverage
|
||||
|
||||
build-net9:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: '9.0.x'
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Build net9.0
|
||||
run: dotnet build --configuration Release --framework net9.0 --no-restore
|
||||
- name: Test net9.0
|
||||
run: dotnet test tests/PSProxmoxVE.Core.Tests/PSProxmoxVE.Core.Tests.csproj --configuration Release --framework net9.0 --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
|
||||
- name: Upload coverage
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage-net9-${{ matrix.os }}
|
||||
path: ./coverage
|
||||
|
||||
Reference in New Issue
Block a user