-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 973 Bytes
/
check.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
name: Lint (nix)
on: [pull_request]
jobs:
lint:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check flake inputs
uses: DeterminateSystems/flake-checker-action@v9
with:
ignore-missing-flake-lock: false
fail-mode: true
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v16
- name: Enable caching
uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Install tools
run: nix-env -iA nixfmt-rfc-style statix -f '<nixpkgs>'
- name: Lint
run: statix check
- name: Check for dead code
uses: astro/deadnix-action@v1
with:
flags: --fail
create_pr: false
- name: Verify format
run: nixfmt --check **/*.nix || { nixfmt --diff **/*.nix | sed 's/^/::error
file=/' ; }