-
Notifications
You must be signed in to change notification settings - Fork 35
49 lines (37 loc) · 1 KB
/
haskell.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
name: Haskell CI
on:
push:
branches: [ "main", "dev-minor" ]
pull_request:
branches: [ "main", "dev-minor" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install required libraries
run: >-
sudo apt install
z3
- name: Cache Stack build artifacts (user + project)
uses: actions/cache@v3
with:
path: |
~/.stack
.stack-work
# best effort for cache: tie it to Stack resolver and package config
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml.lock', 'package.yaml') }}
restore-keys: |
${{ runner.os }}-stack
- name: Setup Haskell
uses: actions/setup-haskell@v1
- name: Install GHC using Stack
if: steps.ghc.outputs.cache-hit != 'true'
run: stack setup --install-ghc
- name: Build
run: stack build
- name: Run tests
run: stack test