Skip to content

Add multi-platform tests to verify compatibility #18

Add multi-platform tests to verify compatibility

Add multi-platform tests to verify compatibility #18

Workflow file for this run

name: Verify
on:
pull_request:
branches: [ main ]
jobs:
linux:
name: Linux - ${{ matrix.arch.name }} - .NET ${{ matrix.dotnet }}
runs-on: ${{ matrix.arch.runs-on }}
strategy:
fail-fast: false
matrix:
dotnet: [8.0, 9.0]
arch:
- name: x64
runtime: linux-x64
platform: linux/amd64
qemu: false
runs-on: ubuntu-latest
- name: arm32
runtime: linux-arm
platform: linux/arm/v7
qemu: true
runs-on: ubuntu-latest
- name: arm64
runtime: linux-arm64
platform: linux/arm64/v8
qemu: false
runs-on: ubuntu-22.04-arm64
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup .NET SDK ${{ matrix.dotnet }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Setup QEMU
if: ${{ matrix.arch.qemu }}
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
if: ${{ matrix.arch.qemu }}
uses: docker/setup-buildx-action@v3
- name: Build and Test (${{ matrix.arch.runtime }})
shell: bash
run: |
echo "=== Building and Testing for ${{ matrix.arch.runtime }} (.NET ${{ matrix.dotnet }}) ==="
if [[ "${{ matrix.arch.qemu }}" == "true" ]]; then
docker run --rm --platform ${{ matrix.arch.platform }} \
-v "$PWD:/src" -w /src \
mcr.microsoft.com/dotnet/sdk:${{ matrix.dotnet }}.0 \
bash -c 'dotnet test Testing/Acceptance/GenHTTP.Testing.Acceptance.csproj -c Release -f net${{ matrix.dotnet }}.0'
else
dotnet test Testing/Acceptance/GenHTTP.Testing.Acceptance.csproj -c Release -f net${{ matrix.dotnet }}.0
windows:
name: Windows – x64 - .NET ${{ matrix.dotnet }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
dotnet: [8.0, 9.0]
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup .NET SDK ${{ matrix.dotnet }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Build and Test (win-x64)
shell: pwsh
run: |
Write-Host "=== Building and Testing for win-x64 (.NET ${{ matrix.dotnet }}) ==="
dotnet test Testing/Acceptance/GenHTTP.Testing.Acceptance.csproj -c Release -f net${{ matrix.dotnet }}.0