-
Notifications
You must be signed in to change notification settings - Fork 49
43 lines (36 loc) · 1.1 KB
/
ci.yml
File metadata and controls
43 lines (36 loc) · 1.1 KB
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
name: Build & test
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: haskell/actions/setup@v2
with:
ghc-version: "9.6.4" # Exact version of ghc to use
# cabal-version: 'latest'. Omitted, but defaults to 'latest'
enable-stack: true
stack-version: "2.15.1"
# Attempt to load cached dependencies
- name: Cache Stack dependencies
uses: actions/cache@v2
with:
path: |
~/.stack
.stack-work
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml') }}
- name: Build and test
run: |
stack build --test --no-run-tests --bench --no-run-benchmarks --haddock --no-haddock-deps --no-haddock-hyperlink-source --fast
# Save cached dependencies
- name: Cache Stack dependencies
uses: actions/cache@v2
with:
path: |
~/.stack
.stack-work
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml') }}