-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (42 loc) · 1.51 KB
/
ci.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
37
38
39
40
41
42
43
44
45
46
47
name: Run tests and push shell closures
on:
pull_request:
branches:
- "trunk"
push:
branches:
- "trunk"
merge_group:
# We also provide a way to run this manually, if needed.
workflow_dispatch:
jobs:
ci:
strategy:
matrix:
runner:
- os: macos-14 # macos sonoma on m1; 3 vcpu, 7 GB memory
base-nixpkgs-channel: nixpkgs-24.05-darwin
- os: ubuntu-22.04 # linux x86_64; 4 vcpu, 16 GB memory
base-nixpkgs-channel: nixos-24.05
ghc:
- ghc-9-6
runs-on: ${{ matrix.runner.os }}
steps:
- name: Install Nix
uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:${{ matrix.runner.base-nixpkgs-channel }}
extra_nix_config: |
extra-substituters = https://nri.cachix.org https://nix-script.cachix.org
trusted-public-keys = nri.cachix.org-1:9/BMj3Obc+uio3O5rYGT+egHzkBzDunAzlZZfhCGj6o= nix-script.cachix.org-1:czo3tF6XERpkDdMd6m84XjmgeHQXNeIooSt7b0560+c= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
- name: Install cachix
run: nix-env -f '<nixpkgs>' -iA cachix
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run tests and push shell closures
run: cachix watch-exec nri -- nix-shell shell-${{ matrix.ghc }}.nix --run "./run-tests.sh"
env:
CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }}
PGPORT: "8088"