-
Notifications
You must be signed in to change notification settings - Fork 12
39 lines (39 loc) · 1.13 KB
/
ci.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
name: Tests
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
merge_group:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ghc: ["8.10", "9.0", "9.2", "9.4", "9.6", "9.8"]
steps:
- uses: actions/checkout@v4
- name: "Setup haskell"
uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: latest
cabal-update: true
- run: |
cabal configure --enable-tests --disable-documentation
cabal build --dry-run
# The latter generates dist-newstyle/cache/plan.json which serves as cache key.
- uses: actions/cache@v3
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ runner.os }}-${{ steps.setup-haskell.outputs.ghc-version }}-${{ hashFiles('dist-newstyle/cache/plan.json') }}
restore-keys: |
${{ runner.os }}-${{ steps.setup-haskell.outputs.ghc-version }}-
- run: cabal build
- run: cabal test
- run: cabal haddock
- run: cabal sdist