-
-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (100 loc) · 3.42 KB
/
build-ci.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: CI/CD
on: push
jobs:
linux1:
strategy:
matrix:
resolver: [lts-10, lts-11, lts-12, lts-13, lts-14, lts-15, lts-16, lts-17, lts-18, lts-19, lts-20, lts-21]
name: Build the Haskell software
runs-on: ubuntu-latest
steps:
- name: set up Haskell environment
uses: hapytex/github-actions/actions/setup-haskell@master
- name: checkout code
uses: actions/checkout@v2.3.1
- name: build haskell project
uses: hapytex/github-actions/actions/build-haskell-project@master
with:
resolver: ${{ matrix.resolver }}
linux2:
name: Build the Haddock documentation
runs-on: ubuntu-latest
steps:
- name: set up Haskell environment
uses: hapytex/github-actions/actions/setup-haskell@master
- name: checkout code
uses: actions/checkout@v2.3.1
- name: make Haddock documentation
uses: hapytex/github-actions/actions/run-haddock@master
id: haddock
- name: echo path
run: "echo '${{ steps.haddock.outputs.haddock-path }}'"
linux3:
name: Look for todos
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2.3.1
- name: look for todos
uses: hapytex/github-actions/actions/look-for-todos@master
with:
directory: src
linux4:
name: Check for hlint suggestions
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2.3.1
- name: look for todos
uses: hapytex/github-actions/actions/hlint@master
with:
directory: src
linux5:
strategy:
matrix:
resolver: [lts-10, lts-11, lts-12, lts-13, lts-14, lts-15, lts-16, lts-17, lts-18, lts-19, lts-20, lts-21]
name: Run the tests
runs-on: ubuntu-latest
steps:
- name: set up Haskell environment
uses: hapytex/github-actions/actions/setup-haskell@master
- name: checkout code
uses: actions/checkout@v2.3.1
- name: run the tests of the package
run: stack --no-terminal --skip-ghc-check test
linux6:
name: Deploy documentation to GitHub pages
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
steps:
- uses: hapytex/github-actions/actions/setup-haskell@master
- name: checkout code
uses: actions/checkout@v2.3.1
- name: make Haddock documentation
uses: hapytex/github-actions/actions/run-haddock@master
id: haddock
- name: Add cname to the directory
uses: hapytex/github-actions/actions/add-cname-to-directory@master
with:
folder: "${{ steps.haddock.outputs.haddock-path }}"
cname: "css-selectors.django-antipatterns.com"
- name: deploy the documentation on the GitHub pages
uses: JamesIves/github-pages-deploy-action@4.0.0
with:
branch: gh-pages
folder: "${{ steps.haddock.outputs.haddock-path }}"
single-commit: true
linux7:
name: Deploy package on hackage
runs-on: ubuntu-latest
needs: [linux1, linux2, linux3, linux4, linux5, linux6]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: hapytex/github-actions/actions/setup-haskell@master
- name: checkout code
uses: actions/checkout@v2.3.1
- name: make Haddock documentation
uses: hapytex/github-actions/actions/hackage-publish@master
with:
HACKAGE_USERNAME: "${{ secrets.HACKAGE_USERNAME }}"
HACKAGE_PASSWORD: "${{ secrets.HACKAGE_PASSWORD }}"