Skip to content

Commit 80b9ba1

Browse files
committed
Add Nix to CI testing
1 parent d91d47c commit 80b9ba1

2 files changed

Lines changed: 30 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ concurrency:
1313
jobs:
1414
prechecks:
1515
uses: ./.github/workflows/pre-commit.yml
16-
all-prechecks:
17-
needs: [prechecks]
16+
nix:
17+
uses: ./.github/workflows/nix.yml
18+
all:
19+
needs: [prechecks, nix]
1820
runs-on: ubuntu-latest
1921
steps:
2022
- name: Success

.github/workflows/nix.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: build and test nix package
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
workflow_dispatch:
7+
workflow_call:
8+
9+
concurrency:
10+
group: nix-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
nix-build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
# Install Nix on the runner
18+
- uses: cachix/install-nix-action@17fe5fb4a23ad6cbbe47d6b3f359611ad276644c # v31
19+
with:
20+
nix_path: nixpkgs=channel:nixos-unstable
21+
# Pull from the cachix cache
22+
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
23+
# Checkout of the current head in the working dir
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
25+
- name: Check nix flake
26+
run: nix flake check -L

0 commit comments

Comments
 (0)