-
Notifications
You must be signed in to change notification settings - Fork 78
44 lines (39 loc) · 1.26 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
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]
resolver: [nightly, lts-22, lts-20, lts-17]
exclude:
- os: windows-latest
resolver: lts-15
- os: windows-latest
resolver: nightly
steps:
- name: Clone project
uses: actions/checkout@v3
- name: Cache dependencies
if: ${{ runner.os != 'Windows' }}
# Andreas Abel, 2023-06-10, switching off caching on Windows since ~/.stack is not the correct path here.
uses: actions/cache@v3
with:
path: ~/.stack
#NB: This path is not valid on Windows
key: ${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles('stack.yaml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.resolver }}-
- name: Build and run tests
shell: bash
run: |
set -ex
stack upgrade || curl -sSL https://get.haskellstack.org/ | sh -s - -f
stack test --bench --no-run-benchmarks --haddock --no-haddock-deps --no-terminal --resolver=${{ matrix.resolver }}