This repository has been archived by the owner on Nov 24, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 575
/
config.yml
75 lines (69 loc) · 1.71 KB
/
config.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
version: 2
workflows:
version: 2
chromeless:
jobs:
- build_node_6
- build_node_8
- release:
requires:
- build_node_6
- build_node_8
filters:
branches:
only: master
restore_cache: &restore_cache
restore_cache:
keys:
- npm-cache-{{ checksum "package-lock.json" }}
save_cache: &save_cache
save_cache:
key: npm-cache-{{ checksum "package-lock.json" }}
paths:
- ~/.npm
codecov: &codecov
run:
name: Codecov
command: node_modules/.bin/nyc report --reporter=json && bash <(curl -s https://codecov.io/bash) -f coverage/coverage-final.json
jobs:
# Build, lint, run tests
build_node_6:
working_directory: ~/chromeless
docker:
- image: circleci/node:6
- image: yukinying/chrome-headless-browser
steps:
- run: node -v; npm -v
- checkout
- *restore_cache
- run: npm install
- *save_cache
- run: npm test
- *codecov
build_node_8:
working_directory: ~/chromeless
docker:
- image: circleci/node:8
- image: yukinying/chrome-headless-browser
steps:
- run: node -v; npm -v
- checkout
- *restore_cache
- run: npm install
- *save_cache
- run: npm test
- *codecov
# On master and if tests passed, parse the commit history to see if a new release should happen
# If yes, publish to npm and tag a release on GitHub
release:
working_directory: ~/chromeless
docker:
- image: circleci/node:8
steps:
- run: node -v; npm -v
- checkout
- *restore_cache
- run: npm install
- *save_cache
- run: npm run build
- run: npm run semantic-release