-
Notifications
You must be signed in to change notification settings - Fork 8
46 lines (38 loc) · 1.03 KB
/
main.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
name: CI
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:
stack:
name: ${{ matrix.os }} / stack
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
name: Setup Haskell Stack
with:
ghc-version: '9.2.7'
enable-stack: true
- uses: actions/cache@v3
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.os }}-stack
- name: Install dependencies
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --only-dependencies
- name: Build
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks
- name: Test
run: |
stack test --system-ghc