-
Notifications
You must be signed in to change notification settings - Fork 4
/
.drone.yml
93 lines (84 loc) · 2.45 KB
/
.drone.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
pipeline:
commits:
image: urbint/commit-lint:13
secrets: [ cindi_ssh_private_key ]
restore-cache:
image: drillster/drone-volume-cache
restore: true
mount:
- .stack-work
- .stack
- dist
volumes:
- /var/lib/drone/cache:/cache
when:
event: [push, pull_request, tag, deployment]
deps:
image: gcr.io/urbint-1259/urbint-haskell-base:28
environment:
- STACK_ROOT=/drone/src/github.com/urbint/graphql-meta/.stack
commands:
- mkdir -p .stack
# - stack upgrade
- stack build --test --only-dependencies
secrets: [ docker_username, docker_password ]
build:
image: gcr.io/urbint-1259/urbint-haskell-base:28
environment:
- STACK_ROOT=/drone/src/github.com/urbint/graphql-meta/.stack
commands:
- stack build --pedantic --ghc-options -Wno-missing-home-modules
secrets: [ docker_username, docker_password ]
test:
group: tests
image: gcr.io/urbint-1259/urbint-haskell-base:28
environment:
- STACK_ROOT=/drone/src/github.com/urbint/graphql-meta/.stack
commands:
- stack test --pedantic --ghc-options -Wno-missing-home-modules
secrets: [ docker_username, docker_password ]
hlint:
group: tests
image: gcr.io/urbint-1259/urbint-haskell-base:28
environment:
- STACK_ROOT=/drone/src/github.com/urbint/graphql-meta/.stack
commands:
- stack install hlint
- stack exec -- hlint src
secrets: [ docker_username, docker_password ]
bench:
image: gcr.io/urbint-1259/urbint-haskell-base:28
environment:
- STACK_ROOT=/drone/src/github.com/urbint/graphql-meta/.stack
commands:
- stack bench --no-run-benchmarks --pedantic --ghc-options -Wno-missing-home-modules
secrets: [ docker_username, docker_password ]
docs:
image: gcr.io/urbint-1259/urbint-haskell-base:28
commands:
- stack haddock
- mkdir -p doc.build
- cp -r "$(stack path --local-doc-root)"/* doc.build
when:
status: [ success ]
branch: master
secrets: [ docker_username, docker_password ]
build-cache:
group: post-build
image: drillster/drone-volume-cache
rebuild: true
mount:
- ./.stack-work
- ./.stack
- dist
volumes:
- /var/lib/drone/cache:/cache
when:
branch: master
status: [ success ]
slack:
group: post-build
image: plugins/slack
secrets: [ slack_webhook ]
when:
status: [ success, failure ]