-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (63 loc) · 2.24 KB
/
Copy pathcheck.yaml
File metadata and controls
74 lines (63 loc) · 2.24 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Check
on:
push:
paths:
- "**.nix"
- "**.rs"
- Cargo.*
- flake.lock
pull_request:
workflow_dispatch:
jobs:
unit-tests:
name: Unit tests
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- feature-set: ""
- feature-set: --all-features
- feature-set: --no-default-features
- feature-set: --no-default-features -F completions
- feature-set: --no-default-features -F completions,manpages
- feature-set: --no-default-features -F manpages
- feature-set: --no-default-features -F replace
steps:
- name: Clone repository
uses: actions/checkout@v7
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v22
with:
extra-conf: |
log-lines = 500
- name: Set up build cache
uses: actions/cache@v6
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: build-${{ runner.os }}-${{ hashFiles('Cargo.toml') }}-${{ hashFiles('flake.nix') }}-${{ hashFiles('**.lock') }}
- name: cargo test ${{ matrix.feature-set }}
run: nix develop -c cargo t -v ${{ matrix.feature-set }}
nix-flake:
name: Nix flake
runs-on: ubuntu-22.04
steps:
- name: Clone repository
uses: actions/checkout@v7
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v22
with:
extra-conf: |
log-lines = 500
- name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v13
with:
fail-mode: true
check-outdated: false
- name: Check Nix flake outputs
run: nix flake check --all-systems