-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (58 loc) · 1.84 KB
/
ci-nix-template.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Template for CI (nix)
on:
workflow_call:
inputs:
os:
required: true
type: string
jobs:
# we do this first and make other jobs dependent on this mainly for
# compute-time efficiency, as the other jobs will re-use built artifacts
# pushed to the cache, no need for a bunch of jobs to build the same stuff in
# parallel when a new dependency is added for example
build:
name: Build
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run build
run: nix build
lint:
name: Lint
runs-on: ${{ inputs.os }}
needs: build
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main
- name: Run lint
run: nix develop --command bash -c "make check-static"
test:
name: Test
runs-on: ${{ inputs.os }}
needs: build
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/configure-git
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run tests
run: nix develop --command bash -c "make test"
install:
name: Install
runs-on: ${{ inputs.os }}
needs: build
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/configure-git
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run install
run: nix profile install '.'
- name: Run --help
run: nava-platform --help
- name: Run e2e
run: make test-e2e