-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (70 loc) · 1.85 KB
/
build.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Build
on:
push:
branches:
- "**"
tags:
- "!**"
jobs:
ormolu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/run-ormolu@v16
hlint:
name: hlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Set up HLint"
uses: haskell-actions/hlint-setup@v2
with:
version: "3.8"
- name: "Run HLint"
uses: haskell-actions/hlint-run@v2
with:
path: '["src/", "test/", "app/"]'
fail-on: suggestion
build:
name: Build
runs-on: ubuntu-latest
needs:
- ormolu
- hlint
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/stack.yaml.lock','**/gitlab-helper.cabal') }}-v2
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-
- uses: haskell-actions/setup@v2.7.9
with:
ghc-version: "9.4.8"
enable-stack: true
stack-version: "2.15.7"
- name: Build dependencies
run: |
stack build --system-ghc --test --only-dependencies
- name: Build
run: |
stack build --system-ghc --test --no-run-tests --coverage --pedantic
- name: Test
run: |
stack test --system-ghc --coverage --copy-bins --local-bin-path .
- uses: actions/upload-artifact@v4
with:
name: gitlab-helper
path: gitlab-helper
markdown:
name: Markdown lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Markdown Lint
uses: avto-dev/markdown-lint@v1.5.0
with:
config: ".markdownlint.json"
args: ". --ignore test_resources/"