File tree Expand file tree Collapse file tree 1 file changed +52
-21
lines changed Expand file tree Collapse file tree 1 file changed +52
-21
lines changed Original file line number Diff line number Diff line change 1
- version : 2
1
+ # Inspired by:
2
+ # https://github.com/teppeis-sandbox/circleci2-multiple-node-versions/blob/master/.circleci/config.yml
3
+ #
4
+ # List of node images:
5
+ # https://hub.docker.com/r/circleci/node/tags/
6
+ #
7
+ # Note that we use the '-browsers' variation which wraps electron with xvfb
8
+ # for headless testing
9
+
10
+ workflows :
11
+ version : 2
12
+ test :
13
+ jobs :
14
+ - node-v6
15
+ - node-v8
2
16
17
+ version : 2
3
18
jobs :
4
- build :
19
+ base : &base
5
20
docker :
6
- # see https://circleci.com/docs/2.0/circleci-images/
7
- # use '-browsers' version to have access to xvfb wrappers
8
- - image : circleci/node:6.10.3-browsers
9
-
21
+ - image : node
10
22
steps :
23
+ - run :
24
+ name : List versions
25
+ command : |
26
+ echo "npm: $(npm --version)"
27
+ echo "node: $(node --version)"
11
28
- checkout
12
-
13
- # Download and cache dependencies
14
29
- restore_cache :
15
30
keys :
16
- - v1-dependencies-{{ checksum "package.json" }}
17
- # fallback to using the latest cache if no exact match is found
18
- - v1-dependencies-
19
-
20
- - run : npm install
21
-
31
+ - v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package.json" }}
32
+ - v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-master-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package.json" }}
33
+ - run :
34
+ name : Install deps
35
+ command : |
36
+ npm install
37
+ sudo apt-get install poppler-utils
38
+ - run :
39
+ name : List deps
40
+ command : |
41
+ npm ls
42
+ pdftops -v
22
43
- save_cache :
23
44
paths :
24
45
- node_modules
25
- key : v1-dependencies -{{ checksum "package.json" }}
26
-
27
- # install pdftops
28
- - run : sudo apt-get install poppler-utils
29
-
30
- - run : npm test
31
-
46
+ key : v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }} -{{ checksum "package.json" }}
47
+ - run :
48
+ name : Test
49
+ command : npm test
50
+ - run :
51
+ name : Coverage
52
+ command : npm run coverage
32
53
- store_artifacts :
33
54
path : build
55
+
56
+ node-v6 :
57
+ << : *base
58
+ docker :
59
+ - image : circleci/node:6.10.3-browsers
60
+
61
+ node-v8 :
62
+ << : *base
63
+ docker :
64
+ - image : circleci/node:8.4.0-browsers
You can’t perform that action at this time.
0 commit comments