mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-04 20:07:41 +00:00
efa08b902b
Fixes Node.js 20 deprecation warnings from v6 versions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
60 lines
2.1 KiB
YAML
60 lines
2.1 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build-net48:
|
|
runs-on: windows-latest
|
|
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 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@v7
|
|
with:
|
|
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@v7
|
|
with:
|
|
name: coverage-net9-${{ matrix.os }}
|
|
path: ./coverage
|