Skip to content

Commit a079c36

Browse files
authored
Merge pull request #18 from plotly/circle-node-6-8
Test node v6 and v8 on circleci
2 parents ce681ad + d8049a2 commit a079c36

File tree

1 file changed

+52
-21
lines changed

1 file changed

+52
-21
lines changed

.circleci/config.yml

Lines changed: 52 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,64 @@
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
216

17+
version: 2
318
jobs:
4-
build:
19+
base: &base
520
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
1022
steps:
23+
- run:
24+
name: List versions
25+
command: |
26+
echo "npm: $(npm --version)"
27+
echo "node: $(node --version)"
1128
- checkout
12-
13-
# Download and cache dependencies
1429
- restore_cache:
1530
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
2243
- save_cache:
2344
paths:
2445
- 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
3253
- store_artifacts:
3354
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

0 commit comments

Comments
 (0)