-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (39 loc) · 1.12 KB
/
nix.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
---
name: nix
on:
push:
branches:
- main
pull_request:
jobs:
check:
runs-on: ubuntu-latest
name: nix flake check
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v9
- name: Running `nix flake check` on flakes
run: |
files=$(find . -name '*flake.nix')
IFS=$'\n'; for file in $files; do
flake_dir=$(dirname "$file")
echo "Running nix flake check on $file"
nix flake check "$flake_dir"
done
formatting:
runs-on: ubuntu-latest
name: alejandra
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v9
- name: installing alejandra
# We're reusing the version from the neovim configuration so that we get expect
# exactly the same style locally and in the CI.
run: nix profile install ./flakes/nvim/#alejandra
- name: running alejandra on nix scripts
run: |
files=$(find . -name '*.nix')
IFS=$'\n'; for file in $files; do
echo "Running alejandra on $file"
alejandra --check "$file"
done