-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (34 loc) · 1005 Bytes
/
haskell.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
name: Haskell CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout code
- name: Setup Haskell
uses: actions/[email protected]
with:
ghc-version: '9.0.1' # Specify the GHC version
cabal-version: '3.4'
- name: Cache Stack
uses: actions/cache@v2
with:
path: |
~/.stack
.stack-work
key: ${{ runner.os }}-stack-${{ hashFiles('**/*.cabal', '**/stack.yaml', '**/stack.yaml.lock') }}
restore-keys: |
${{ runner.os }}-stack-
- name: Build project
run: stack build --test --bench --no-run-tests --no-run-benchmarks
- name: Run tests
run: stack test
# Optional: Add a step for linting if you're using HLint or a similar tool
- name: Lint
run: stack exec hlint .
# Optional: Add steps for additional checks like code formatting