-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (39 loc) · 1.36 KB
/
test.yml
File metadata and controls
41 lines (39 loc) · 1.36 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
name: test
on:
push:
branches:
- master
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- uses: nixbuild/nix-quick-install-action@8505cd40ae3d4791ca658f2697c5767212e5ce71 # v30
with:
nix_conf: |
keep-env-derivations = true
keep-outputs = true
- name: Nix cache
uses: nix-community/cache-nix-action@135667ec418502fa5a3598af6fb9eb733888ce6a # v6
with:
# restore and save a cache using this key.
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
# if there's no cache hit, restore a cache by this prefix.
restore-prefixes-first-match: nix-${{ runner.os }}-
# collect garbage until the Nix store size (in bytes) is at most this number
# before trying to save a new cache.
gc-max-store-size-linux: 2G
- name: Ensure flake.lock was committed
run: ls flake.lock
- run: nix flake check -L
- run: nix build -L
- run: glistix deps download
shell: nix develop --command bash -e {0}
- run: glistix test --target nix
shell: nix develop --command bash -e {0}
- run: glistix format --check src test
shell: nix develop --command bash -e {0}