-
Notifications
You must be signed in to change notification settings - Fork 5
47 lines (39 loc) · 1.31 KB
/
haskell.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
name: Haskell tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
STACK_ARGS: --no-terminal --system-ghc --resolver=${{ matrix.snapshot }}
strategy:
fail-fast: false
matrix:
include:
- snapshot: nightly-2024-01-15
ghc: 9.8.1
- snapshot: lts-22.6
ghc: 9.6.3
- snapshot: lts-21.25
ghc: 9.4.8
steps:
- uses: actions/checkout@v4
- name: Setup Haskell Stack
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
enable-stack: true
stack-version: 'latest'
- name: Cache dependencies
id: cache-stack
uses: actions/cache@v3
with:
path: ~/.stack
key: ${{ runner.os }}-stack-${{ matrix.snapshot }}-${{ hashFiles('**/stack.yaml') }}
restore-keys: |
${{ runner.os }}-stack-${{ matrix.snapshot }}-
- name: Dependencies
run: stack ${{ env.STACK_ARGS }} test --dependencies-only
- name: Build and Test
run: |
stack ${{ env.STACK_ARGS }} exec -- ghc --version
stack ${{ env.STACK_ARGS }} test