-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (64 loc) · 1.59 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
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
67
68
69
70
71
72
on:
# Trigger the workflow on push or
# pull request, but only for the
# master branch.
push:
branches:
- master
pull_request:
branches:
- master
# Weekly run to account for
# changed dependencies.
schedule:
- cron: '17 04 * * 0'
name: CI
jobs:
build:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
ghc:
- '8.0'
- '8.2'
- '8.4'
- '8.6'
- '8.8'
- '8.10'
- '9.0'
- '9.2'
- '9.4'
- '9.6'
- 'latest'
# Also build on macos. Windows seems flaky, with some
# quickcheck failure appearing relatively consistent, but not
# always.
include:
- os: macos-latest
ghc: 'latest'
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Haskell
uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Configure
run: cabal configure --enable-tests --enable-library-coverage
- name: Build the code
run: cabal build
- name: Run tests
run: cabal test
- name: Generate coverage report
uses: 8c6794b6/hpc-codecov-action@v2
with:
target: cabal:test-units
excludes: Main,Paths_my_package
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
name: codecov-${{ matrix.os }}-${{ matrix.ghc }}