Skip to content

Commit 166291f

Browse files
committed
feat(ci): add GitHub actions config
1 parent d55c949 commit 166291f

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Run RaspberryPi-Gateway tests
2+
on:
3+
pull_request:
4+
push:
5+
workflow_dispatch:
6+
jobs:
7+
flake:
8+
name: Run Nix flake checks
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Initialize Nix store paths
13+
run: |
14+
sudo mkdir -p /nix/store
15+
sudo chmod -R 777 /nix
16+
# https://github.com/cachix/install-nix-action/issues/56#issuecomment-1030697681
17+
- name: Configure Nix store cache
18+
uses: actions/cache@v4
19+
with:
20+
key: ${{ runner.os }}-${{ runner.arch }}-nix-store
21+
# See https://github.com/actions/cache/pull/726 and
22+
# https://github.com/actions/cache/issues/494 for caveats on negative
23+
# patterns.
24+
path: |
25+
/nix/store/**
26+
/nix/var/nix/*/*
27+
/nix/var/nix/db/*
28+
/nix/var/nix/db/*/**
29+
!/nix/var/nix/daemon-socket/socket
30+
!/nix/var/nix/userpool/*
31+
!/nix/var/nix/gc.lock
32+
!/nix/var/nix/db/big-lock
33+
!/nix/var/nix/db/reserved
34+
- name: Install Nix
35+
uses: cachix/install-nix-action@v31
36+
with:
37+
extra_nix_config: |
38+
system-features = benchmark big-parallel kvm nixos-test uid-range
39+
- name: Run Nix flake checks
40+
run: |
41+
nix flake check -L

0 commit comments

Comments
 (0)