-
Notifications
You must be signed in to change notification settings - Fork 11
48 lines (41 loc) · 1.76 KB
/
test-suite.yaml
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
48
name: Test suite
env:
ALLOWED_URIS: "https://github.com https://api.github.com"
TRUSTED_PUBLIC_KEYS: "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= marlowe-temp.cachix.org-1:1gPjVFpu4QjaAT3tRurCioX+BC23V7mjvFwpP5bV0Ec= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk="
SUBSTITUTERS: "https://cache.nixos.org/ https://cache.iog.io https://marlowe-temp.cachix.org https://cache.zw3rk.com/"
on:
pull_request:
types:
- opened
- synchronize
jobs:
test-suite:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3.3.0
- name: 🐣 Install Nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
install_url: https://releases.nixos.org/nix/nix-2.10.3/install
extra_nix_config: |
allowed-uris = ${{ env.ALLOWED_URIS }}
trusted-public-keys = ${{ env.TRUSTED_PUBLIC_KEYS }}
substituters = ${{ env.SUBSTITUTERS }}
experimental-features = nix-command flakes
- name: 📝 Check formatting
run: |
nix develop --show-trace --command bash -c "pre-commit run --all-files"
- name: 🔨 Build project
run: |
nix develop --show-trace --command bash -c "npm i && npm run build"
- name: 🧪 Run npm tests
run: |
nix develop --show-trace --command bash -c "npm test"
- name: 🧪 Run nix test-spec
run: |
nix develop --show-trace --command bash -c "test-spec"
- name: 🏥 Check docs generation
run: |
nix develop --show-trace --command bash -c "npm --prefix ./doc/theme/ run build && npm run docs"