-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (38 loc) · 1.02 KB
/
build.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
name: build
on:
push:
branches:
- master
paths:
- '.github/workflows/build.yml'
- "src/**"
- "*.cabal"
- "stack*.yaml"
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Install Haskell
uses: haskell/actions/setup@v1
with:
ghc-version: "8.10.7"
enable-stack: true
stack-version: "latest"
- name: Cache .stack
uses: actions/cache@v2
with:
path: ~/.stack
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}
restore-keys: ${{ runner.os }}-
- name: Install dependencies
run: |
stack --no-terminal build --only-dependencies --test --fast --system-ghc
- name: Build and install
run: |
stack --no-terminal build --test --fast --system-ghc --no-run-tests
- name: Run tests
run: |
stack --no-terminal build --test --fast --system-ghc