-
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1 KB
/
test.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
name: Test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
ghc: ["9.8", "9.6"]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Haskell
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
enable-stack: true
stack-version: 'latest'
- name: Cache Stack dependencies
uses: actions/cache@v4
with:
path: ~/.stack
key: ${{ runner.os }}-stack-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('stack.yaml') }}
restore-keys: |
${{ runner.os }}-stack-${{ matrix.ghc }}-
${{ runner.os }}-stack-
- name: Install dependencies
run: stack build --only-dependencies
- name: Build and Test
run: stack test