-
Notifications
You must be signed in to change notification settings - Fork 374
57 lines (51 loc) · 1.43 KB
/
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
53
54
55
56
57
name: Tests
on:
pull_request:
push:
branches:
- master
jobs:
build:
name: CI
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
args:
- "--resolver lts-22"
- "--resolver lts-20"
- "--resolver lts-18"
- "--resolver lts-16"
exclude:
# llvm too new on macos-latest for ghc 8
- os: macos-latest
args: "--resolver lts-18"
- os: macos-latest
args: "--resolver lts-16"
steps:
- name: Clone project
uses: actions/checkout@v4
# Getting weird OS X errors...
# - name: Cache dependencies
# uses: actions/cache@v1
# with:
# path: ~/.stack
# key: ${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles('stack.yaml') }}
# restore-keys: |
# ${{ runner.os }}-${{ matrix.resolver }}-
- name: Install stack if needed
shell: bash
run: |
set -ex
if [[ "${{ matrix.os }}" == "macos-latest" ]]
then
# macos-latest does not include Haskell tools as of 2024-05-06.
curl -sSL https://get.haskellstack.org/ | sh
fi
- name: Build and run tests
shell: bash
run: |
set -ex
stack --version
stack test --fast --no-terminal ${{ matrix.args }}