66 lines
1.7 KiB
YAML
66 lines
1.7 KiB
YAML
name: reliability-matrix
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
|
|
jobs:
|
|
matrix:
|
|
name: ${{ matrix.os }} / .NET tests
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 10.0.x
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Restore
|
|
run: dotnet restore DevTool.csproj
|
|
|
|
- name: Build
|
|
run: dotnet build DevTool.csproj -c Release --no-restore
|
|
|
|
- name: Verify workflow routes (static)
|
|
run: python scripts/verify-workflow-routes.py --project-root .
|
|
|
|
- name: Test
|
|
run: dotnet test tests/DevTool.Tests/DevTool.Tests.csproj -c Release --no-build --logger "trx;LogFileName=test-results.trx"
|
|
|
|
- name: Generate matrix summary
|
|
shell: pwsh
|
|
run: |
|
|
New-Item -ItemType Directory -Force -Path artifacts | Out-Null
|
|
@"
|
|
{
|
|
"os": "${{ matrix.os }}",
|
|
"commit": "${{ github.sha }}",
|
|
"workflow": "${{ github.workflow }}",
|
|
"runId": "${{ github.run_id }}",
|
|
"runNumber": "${{ github.run_number }}",
|
|
"status": "passed"
|
|
}
|
|
"@ | Set-Content artifacts/reliability-${{ matrix.os }}.json -Encoding UTF8
|
|
|
|
- name: Upload test artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: reliability-${{ matrix.os }}
|
|
path: |
|
|
**/test-results.trx
|
|
artifacts/reliability-${{ matrix.os }}.json
|