name: Checks
on:
  pull_request:
  push:
    branches:
      - main
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        check:
          - cargo-clippy
          - cargo-fmt
    steps:
      - name: Checkout
        uses: actions/checkout@v6
      - name: Install Nix
        uses: cachix/install-nix-action@v31
      - name: Checks
        run: nix build .#checks.x86_64-linux.${{ matrix.check }} -L
