-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (45 loc) · 1.35 KB
/
test.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
49
50
51
52
53
54
---
name: Test
on:
pull_request:
types:
- synchronize
- opened
- reopened
- ready_for_review
jobs:
test:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
# Github actions L1 cache
- name: stack home cache
id: cache-home-stack
uses: actions/cache@v2
with:
path: |
/github/home/.stack
key: ${{ runner.os }}-home-stack-${{ hashFiles('stack.yaml.lock') }}
restore-keys: |
${{ runner.os }}-home-stack-
- name: stack work cache
uses: actions/cache@v2
id: cache-stack-work
with:
path: |
**/.stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml.lock') }}-${{ hashFiles('aws-ec2-knownhosts.cabal') }}
restore-keys: |
${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml.lock') }}-
${{ runner.os }}-stack-work-
# Build
- name: stack build
run: |
stack build --test --bench --no-run-tests --no-run-benchmarks --ghc-options="+RTS -A256m -I0 -RTS" --no-interleaved-output
# Test
- name: stack test
run: |
stack test --ghc-options="+RTS -A256m -I0 -RTS" --no-interleaved-output