-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.09 KB
/
coverage.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: Brat Test Coverage
on:
push:
branches:
- "main"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: brat/
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
with:
ghc-version: '9.6.4'
cabal-version: '3.4'
enable-stack: true
# from: https://raehik.github.io/2021/03/01/caching-stack-and-cabal-haskell-builds-on-github-actions.html
- uses: actions/cache@v4
with:
path: |
~/.stack
.stack-work
# best effort for cache: tie it to Stack resolver and package config
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml.lock', 'package.yaml') }}
restore-keys: |
${{ runner.os }}-stack
- name: Run tests with coverage
run: |
stack test --coverage --no-run-benchmarks
echo "artifactPath=$(stack path --local-hpc-root)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: coverage
path: ${{ env.artifactPath }}
if-no-files-found: error