-
Notifications
You must be signed in to change notification settings - Fork 10
55 lines (53 loc) · 1.58 KB
/
ci.yml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: ci
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: nix build packages/*.nix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- run: basename -s .nix packages/* | sed 's/.*/.#&/' | xargs nix build
test:
name: nix flake check --all-systems
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
extra_nix_config: "extra-platforms = aarch64-linux"
- run: nix flake check --all-systems
format:
name: nix fmt -- --check **/*.nix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- run: nix fmt -- --check **/*.nix
example:
name: nix flake check ./example
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- run: cp ./hosts/laptop/hardware-configuration.nix ./example/hardware-configuration.nix
- run: git add .
- run: nix flake check ./example --no-write-lock-file --override-input nix-config "git+file://$(pwd | sed -e 's/\s/%20/g')?shallow=1"
statix:
name: statix check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- run: nix run nixpkgs#statix check
nixd:
name: nixf-tidy --variable-lookup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- run: nix run .#nixf-tidy