-
Notifications
You must be signed in to change notification settings - Fork 80
32 lines (26 loc) · 908 Bytes
/
main.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
name: tests
on:
push:
branches: [master]
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
steps:
# Setup
- name: Check out source repository
uses: actions/checkout@v2
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@v2
# Separates all the cache downloading time from the time required to actually run a step
# of the workflow
- name: Initialize Nix
run: nix develop
# Unfortunately I can't run 'spago test' in a derivation because it doesn't
# have a mode that ignores the cache. So we run it in a script instead.
# Once we can make this a normal derivation then we can delete this
# workflow file altogether.
- name: Run Spago tests
run: nix develop --command run-tests-script