-
-
Notifications
You must be signed in to change notification settings - Fork 98
33 lines (29 loc) · 899 Bytes
/
nix.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
name: Run Flake
on: [ push, pull_request ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
nix-flake:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v13
- name: Cache Nix dependencies
uses: DeterminateSystems/magic-nix-cache-action@v7
# Upstream package sometimes has flags set that disable flake checking
- name: Setup test env
run: |
echo 'NIXPKGS_ALLOW_BROKEN=1' >> $GITHUB_ENV
- name: Check flake
run: nix flake check --impure
- name: Build flake
run: nix build
- name: Test run in shell
run: nix shell -c sile --version
- name: Test run as flake
run: nix run . -- --version