-
Notifications
You must be signed in to change notification settings - Fork 26
/
validate
executable file
·52 lines (38 loc) · 1.26 KB
/
validate
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
#!/usr/bin/env bash
set -euo pipefail
function colourize {
echo -e "$(tput setaf $1)$2$(tput sgr 0)"
}
function vspace {
echo -en "\n"
}
colour=4
colourize $colour "╭───────────╮"
colourize $colour "│ Testsuite │"
colourize $colour "╰───────────╯"
stack test --coverage --ghc-options -Werror --test-arguments --hide-successes
vspace
colourize $colour "╭──────────╮"
colourize $colour "│ Doctests │"
colourize $colour "╰──────────╯"
stack test --flag stgi:doctest --ghc-options -Werror
vspace
colourize $colour "╭─────────╮"
colourize $colour "│ Haddock │"
colourize $colour "╰─────────╯"
stack haddock --no-haddock-deps
vspace
colourize $colour "╭───────╮"
colourize $colour "│ SDist │"
colourize $colour "╰───────╯"
stack sdist
vspace
colourize $colour "╭─────────────╮"
colourize $colour "│ Cabal check │"
colourize $colour "╰─────────────╯"
cabal check
vspace
colourize $colour "╭───────╮"
colourize $colour "│ HLint │"
colourize $colour "╰───────╯"
hlint src test app