Files
PSProxmoxVE/.github/workflows/build.yml
T

46 lines
1.2 KiB
YAML

name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
test-framework: net48
- os: windows-latest
test-framework: net10.0
- os: ubuntu-latest
test-framework: net10.0
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: '10.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build solution
run: dotnet build --configuration Release --no-restore
- name: Run xUnit tests
run: dotnet test tests/PSProxmoxVE.Core.Tests/PSProxmoxVE.Core.Tests.csproj --configuration Release --framework ${{ matrix.test-framework }} --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
- name: Upload coverage
if: always()
uses: actions/upload-artifact@v7
with:
name: coverage-${{ matrix.test-framework }}-${{ matrix.os }}
path: ./coverage