diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..65bd146 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@v13 + - name: Check formatting (nixfmt) + run: nix run nixpkgs#nixfmt-rfc-style -- --check *.nix docs/*.nix tests/*.nix + - name: Lint (statix) + run: nix run nixpkgs#statix -- check . + + check: + needs: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@v13 + - name: nix flake check + run: nix flake check --keep-going