-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.87 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
48
49
50
51
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
workflow:
name: Workflow
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- uses: cachix/install-nix-action@v13
with:
install_url: https://nixos-nix-install-tests.cachix.org/serve/0f7lh6yrv84dj3a2ar073d1mwrfiflsz/install
install_options: --tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve
extra_nix_config: |
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v10
with:
name: cascade
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Cache ~/.cabal/store
uses: actions/[email protected]
with:
path: ~/.cabal/store
key: ${{ runner.os }}-build-${{ hashFiles('shell.nix', 'cabal.project', 'cabal.project.freeze', 'cabal.project.local') }}
restore-keys: |
${{ runner.os }}-build-
- name: Bootstrap
run: |
nix -Lv develop -c ./scripts/bootstrap.sh
nix -Lv develop -c cabal update
nix -Lv develop -c cabal new-configure --disable-documentation \
--disable-optimization \
--enable-tests \
--enable-benchmarks \
--disable-coverage \
--test-show-details=direct
- name: Build
run: nix -Lv develop -c cabal build all
- name: Cache ~/.cascade/tmp-postgres
uses: actions/[email protected]
with:
path: ~/.cascade/tmp-postgres
key: ${{ runner.os }}-test-${{ hashFiles('migrations/**/*') }}
- name: Test
run: nix -Lv develop -c cabal test all