-
Notifications
You must be signed in to change notification settings - Fork 263
executable file
·66 lines (60 loc) · 2.01 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
58
59
60
61
62
63
64
65
66
name: Tests
on:
push:
branches: [ 'master', 'ci' ]
pull_request:
branches: [ 'master' ]
jobs:
stack:
name: Stack
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
stack: ["latest"]
args:
- "--resolver nightly --stack-yaml stack-nightly.yaml"
- "--resolver lts-22"
- "--resolver lts-21 --stack-yaml stack-lts-21.yaml"
- "--resolver lts-20 --stack-yaml stack-lts-20.yaml"
- "--resolver lts-19 --stack-yaml stack-lts-19.yaml"
- "--resolver lts-18 --stack-yaml stack-lts-18.yaml"
exclude:
- os: "macos-latest"
args: "--resolver lts-19 --stack-yaml stack-lts-19.yaml"
- os: "macos-latest"
args: "--resolver lts-18 --stack-yaml stack-lts-18.yaml"
steps:
- name: Clone project
uses: actions/checkout@v4
# Not sure how to have GHC not setup twice
# Something with settings "ghc-version"?
# ["9.8", "9.6", "9.4", "9.2", "9.0", "8.10"]
- uses: haskell-actions/setup@v2
name: Setup Haskell Stack
with:
stack-version: ${{ matrix.stack }}
enable-stack: true
# 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: Build and run tests
shell: bash
run: |
set -ex
EXTRA=""
BENCH="--bench"
if [[ ${{ matrix.os }} = "windows-latest" ]]
then
EXTRA="--no-run-tests"
elif [[ ${{ matrix.os }} = "macos-latest" ]]
then
BENCH=""
fi
stack test --no-terminal ${{ matrix.args }} --haddock --no-haddock-deps $BENCH --no-run-benchmarks $EXTRA