name: lint

on:
  pull_request:
  merge_group:

defaults:
  run:
    shell: bash

jobs:
  treefmt:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v7
      - name: Install Nix
        uses: cachix/install-nix-action@v31
      - name: Run nix and Lix parse checks
        run: nix build --show-trace --keep-going .#checks.x86_64-linux.parseNix .#checks.x86_64-linux.parseLix --accept-flake-config
      - name: Run treefmt check
        run: nix build .#checks.x86_64-linux.treefmt --accept-flake-config
