name: "Test"
on:
  pull_request:
  merge_group:
  push:
    branches:
      - master
jobs:
  tests:
    strategy:
      fail-fast: false
      matrix:
        include:
          - system: x86_64-linux
            runner: ubuntu-latest
          - system: aarch64-linux
            runner: ubuntu-24.04-arm
    runs-on: ${{ matrix.runner }}
    steps:
    - uses: actions/checkout@v7
      with:
        fetch-depth: 0
    - uses: cachix/install-nix-action@v31
      with:
        extra_nix_config: |
          extra-systems = ${{ matrix.system }}
    - uses: cachix/cachix-action@v17
      with:
        name: hydra-test-cache
        authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
    - run: nix-build -A checks.${{ matrix.system }}.systemTests -A checks.${{ matrix.system }}.validate-openapi -A checks.${{ matrix.system }}.formatter
