-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (49 loc) · 1.35 KB
/
unit-tests.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
50
51
52
name: Unit tests
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
# As of 6 August 2023, ubuntu-latest, windows-latest and macos-latest come
# with Stack 2.11.1 and GHC 9.6.2.
jobs:
unit-tests:
name: Unit tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
resolver:
- stack-ghc-9.2.8.yaml
- stack-ghc-9.4.5.yaml
- stack-ghc-9.6.2.yaml
include:
- os: windows-latest
resolver: stack-ghc-9.6.2.yaml
- os: macos-latest
resolver: stack-ghc-9.6.2.yaml
steps:
- name: Clone project
uses: actions/checkout@v3
- name: Cache dependencies on Unix-like OS
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
uses: actions/cache@v3
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.resolver }}
- name: Cache dependencies on Windows
if: startsWith(runner.os, 'Windows')
uses: actions/cache@v3
with:
path: |
~\AppData\Roaming\stack
~\AppData\Local\Programs\stack
key: ${{ runner.os }}-${{ matrix.resolver }}
- name: Run tests
shell: bash
run: |
set -ex
stack --resolver ${{ matrix.resolver }} test --bench --no-run-benchmarks --haddock --no-haddock-deps