-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
87 lines (80 loc) · 1.73 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
kind: pipeline
type: docker
name: default
volumes:
- name: cache
host:
path: /tmp/cache
steps:
- name: restore-cache
image: meltwater/drone-cache
pull: true
settings:
backend: 'filesystem'
restore: true
cache_key: 'volume'
archive_format: 'gzip'
mount:
- 'node_modules'
volumes:
- name: cache
path: /tmp/cache
- name: dependencies
image: emilianobovetti/fpc-js-builder
commands:
- yarn
depends_on:
- restore-cache
- name: lint
image: emilianobovetti/fpc-js-builder
commands:
- yarn lint
depends_on:
- dependencies
- name: test
image: emilianobovetti/fpc-js-builder
environment:
CODECOV_TOKEN:
from_secret: codecov-token
commands:
- yarn test --ci --coverage
- >
codecov -t "$CODECOV_TOKEN" \
--branch "$DRONE_BRANCH" \
--build "$DRONE_BUILD_NUMBER" \
--sha "$DRONE_COMMIT" \
--pr "$DRONE_PULL_REQUEST" \
--tag "$DRONE_TAG"
depends_on:
- dependencies
- name: publish
image: emilianobovetti/fpc-js-builder
environment:
NPM_TOKEN:
from_secret: semantic-release-npm-token
GITHUB_TOKEN:
from_secret: semantic-release-github-token
commands:
- semantic-release
depends_on:
- lint
- test
when:
branch: master
- name: rebuild-cache
image: meltwater/drone-cache
pull: true
settings:
backend: 'filesystem'
rebuild: true
cache_key: 'volume'
archive_format: 'gzip'
mount:
- 'node_modules'
volumes:
- name: cache
path: /tmp/cache
depends_on:
- lint
- test
- publish