name: PR

on:

  pull_request:
    branches: [ main, 3.x ]

env:
  DOTNET_NOLOGO: true
  DOTNET_CLI_TELEMETRY_OPTOUT: 1

concurrency:
  group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.run_id }}
  cancel-in-progress: true

jobs:

  test:

    name: ${{ matrix.os.name }}

    strategy:
      matrix:
        os:
          - { name: 'linux', image: 'ubuntu-latest' }
          - { name: 'linux - ARM', image: 'ubuntu-24.04-arm' }
          - { name: 'windows', image: 'windows-latest' }
          - { name: 'macos', image: 'macos-latest' }

    runs-on: ${{ matrix.os.image }}

    steps:

    - name: Setup NET
      uses: actions/setup-dotnet@v4
      with:
        dotnet-version: 9.0

    - name: Checkout source code
      uses: actions/checkout@v4

    - name: Test
      run: dotnet test --configuration Release --logger GitHubActions

