-
Notifications
You must be signed in to change notification settings - Fork 5
36 lines (34 loc) · 946 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
34
35
36
name: Check nix code
on:
workflow_dispatch:
push:
branches:
- 'main'
permissions:
contents: read
statuses: write
jobs:
check_nix:
name: Check nix code
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
- name: Set up cachix
uses: cachix/cachix-action@v15
with:
name: polarity
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Evaluate nix code
run: nix -Lv flake check
- name: Build and run polarity using nix
run: nix -Lv run .# -- --help
- name: Build and run a static polarity exe
if: matrix.os == 'ubuntu-latest'
run: nix -Lv run .#polarity-static -- --help
- name: Drop into nix devshell and run tests
run: nix develop -Lv -c bash -c "make test"