-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (52 loc) · 1.49 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Checks
on:
pull_request:
push:
branches: [main]
jobs:
nix-flake-check:
name: Run nix flake check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v15
with:
name: dlr-ft
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Nix Flake Check
run: nix flake check
impure-checks:
name: Run check ${{ matrix.check }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
check:
- cargo clippy --all-features -- -D warnings
- cargo clippy -- -D warnings
- udeps
- treefmt --fail-on-change
- audit --deny warnings
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v15
with:
name: dlr-ft
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run check ${{ matrix.check }}
run: nix develop --command ${{ matrix.check }}