-
Notifications
You must be signed in to change notification settings - Fork 1
/
.drone.yml
69 lines (62 loc) · 1.66 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
kind: pipeline
name: kryptonite
volumes:
- name: cache
host:
path: /tmp/drone/cache
steps:
# Get cached stuff from last run.
- name: restore-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
restore: true
mount: [/root/.mix, /root/.hex, ./deps, ./_build]
# Runs all tests.
- name: build
image: elixir:1.7
commands:
- mix do local.rebar --force, local.hex --force
- MIX_ENV=test mix do deps.get, test
# Check code formatting, linting and dialyze it using latest elixir.
- name: checks
image: elixir:1.7
commands:
- mix do local.rebar --force, local.hex --force
- MIX_ENV=dev mix do deps.get, format --check-formatted, credo --all, dialyzer
- MIX_ENV=test mix do deps.get, coveralls.json
# Webhook our slack channel.
- name: slack-notify
image: plugins/slack
settings:
webhook:
from_secret: slack_webhook
channel: ci
username: Drone
template: >
[{{repo.name}}:{{build.branch}}]
<{{build.link}}|Build {{truncate build.commit 8}}> by {{build.author}}
was a {{build.status}}.
when:
status: [success, failure]
# Upload coverage reports, only for the latest elixir.
- name: codecov
when:
status: [success]
image: plugins/codecov
settings:
token:
from_secret: codecov_token
files:
- cover/excoveralls.json
# Save cache.
- name: rebuild-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount: [/root/.mix, /root/.hex, ./deps, ./_build]