-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (43 loc) · 1.39 KB
/
CI.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
name: CI (Stack)
on: [push, pull_request]
jobs:
test_with_stack:
name: Testing with Stack-${{ matrix.stack }}, on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
stack: ["2.9.3"]
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
ghc-version: ${{ matrix.ghc }}
stack-version: ${{ matrix.stack }}
- name: Cache (Unix platform)
uses: actions/cache@v2
with:
path: ~/.stack
key: stack-cache-${{ runner.os }}-${{ hashFiles('stack.yaml.lock') }}-${{ hashFiles('stack.yaml') }}
restore-keys: |
stack-cache-${{ runner.os }}-${{ hashFiles('stack.yaml.lock') }}
stack-cache-${{ runner.os }}
- name: Install dependencies
run: |
stack update
stack build --system-ghc --only-dependencies --test --bench --no-run-tests --no-run-benchmarks
- name: Build
run: stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks
- name: Run tests
run: stack test
hlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Set up HLint"
uses: haskell/actions/hlint-setup@v2
- name: "Run HLint"
uses: haskell/actions/hlint-run@v2
with:
path: .
fail-on: warning