-
Notifications
You must be signed in to change notification settings - Fork 17
40 lines (37 loc) · 1.06 KB
/
nix-checks.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
name: basic nix checks
on: [pull_request]
jobs:
instantiate:
name: nix-instantiate
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: actions/checkout@v4
- run: nix-instantiate release.nix -A qchem
# Check if the flake is sane
check:
name: nix flake check
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: actions/checkout@v4
- run: |
nix-instantiate release.nix -A qchem
nix flake check --accept-flake-config --no-build
statix:
name: statix code check
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v25
- uses: actions/checkout@v4
- name: get changed files
id: changed-files
uses: tj-actions/changed-files@v41
- run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
nix run nixpkgs#statix -- check $file
done