name: PR Validation

on: [pull_request]

concurrency:
  group: pr-validation-${{ github.ref }}
  cancel-in-progress: true

jobs:
  Whitespace-Check:
    uses: ./.github/workflows/trailing-whitespace-check.yml
    secrets: inherit
    name: '1'
    
  Tests:
    needs: Whitespace-Check
    uses: ./.github/workflows/integration-tests.yml
    secrets: inherit
    name: '2'

  build:
    needs: [Whitespace-Check, Tests]
    runs-on: windows-latest
    timeout-minutes: 10
    name: '3 / Build'

    steps:
    - uses: actions/checkout@v4

    - name: Setup dotnet
      uses: actions/setup-dotnet@v4
      with:
        dotnet-version: |
          6.0.x
          8.0.x
          10.0.x

    - name: Build
      run: .\build.ps1
