-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (38 loc) · 1.11 KB
/
Copy pathci.yml
File metadata and controls
40 lines (38 loc) · 1.11 KB
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
on:
workflow_dispatch:
pull_request:
types: [synchronize, opened, reopened]
push:
branches: [master]
schedule:
# additionally run once per week (At 00:00 on Sunday) to maintain cache
- cron: '0 0 * * 0'
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
cabal: ["3.4"]
ghc: ["8.8.4", "8.10.5", "9.2.2"]
env:
CONFIG: "--enable-tests --enable-benchmarks"
SIM_FIN_API_KEY: ${{ secrets.SIM_FIN_API_KEY }}
steps:
- uses: actions/checkout@v2.3.4
- uses: haskell/actions/setup@v1.2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- run: cabal v2-update
- run: cabal v2-freeze $CONFIG
- uses: actions/cache@v2
with:
path: |
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-
- run: cabal v2-build $CONFIG
- run: cabal v2-test $CONFIG
- run: cabal v2-haddock $CONFIG