-
Notifications
You must be signed in to change notification settings - Fork 7
/
circle.yml
62 lines (57 loc) · 1.5 KB
/
circle.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
restore_cache: &restore_cache
keys:
- node-modules-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum "package.json" }}
- node-modules-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package.json" }}
- node-modules-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
save_cache: &save_cache
key: node-modules-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum "package.json" }}
paths:
- node_modules
steps: &steps
- checkout
- restore_cache: *restore_cache
- run: npm install
# - run: npm test
- save_cache: *save_cache
- store_test_results:
path: reports
version: 2
jobs:
lint:
docker:
- image: node:8
steps:
- checkout
- restore_cache: *restore_cache
- run: npm install
- run: npm run lint
- save_cache: *save_cache
release:
docker:
- image: node:8
steps:
- checkout
- restore_cache: *restore_cache
- run: npm install
- deploy:
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
npm version minor
git push origin master --tags
npm publish
fi
- save_cache: *save_cache
workflows:
version: 2
build:
jobs:
# Reminder: we don't want to block tests on lint, otherwise #no-push
# prevents tests from running
- lint
- release:
context: org-global
filters:
branches:
only: master
requires:
- lint