Skip to content

Commit 0666d56

Browse files
author
Dom Harrington
committed
Run tests against node8 and node10 on circle
1 parent 410b3b6 commit 0666d56

File tree

1 file changed

+40
-27
lines changed

1 file changed

+40
-27
lines changed

.circleci/config.yml

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,46 @@
1-
version: 2
2-
jobs:
3-
build:
4-
docker:
5-
- image: circleci/node:10
6-
environment:
7-
CC_TEST_REPORTER_ID: ae1797a82fef7dc0abc059ecbd7b189664ffc3bf254869dc383339748c413c73
8-
9-
working_directory: ~/repo
10-
11-
steps:
12-
- checkout
13-
14-
# Download and cache dependencies
15-
- restore_cache:
16-
keys:
1+
default: &default
2+
working_directory: ~/repo
3+
steps:
4+
- checkout
5+
# Download and cache dependencies
6+
- restore_cache:
7+
keys:
178
- v1-dependencies-{{ checksum "package.json" }}
189
# fallback to using the latest cache if no exact match is found
1910
- v1-dependencies-
11+
- run: npm install
12+
- save_cache:
13+
paths:
14+
- node_modules
15+
key: v1-dependencies-{{ checksum "package.json" }}
2016

21-
- run: npm install
17+
# run tests!
18+
- run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
19+
- run: chmod +x ./cc-test-reporter
20+
- run: ./cc-test-reporter before-build
21+
- run: npm test
22+
- run: ./cc-test-reporter after-build -t lcov --exit-code $?
2223

23-
- save_cache:
24-
paths:
25-
- node_modules
26-
key: v1-dependencies-{{ checksum "package.json" }}
24+
environment: &environment
25+
CC_TEST_REPORTER_ID: ae1797a82fef7dc0abc059ecbd7b189664ffc3bf254869dc383339748c413c73
2726

28-
# run tests!
29-
- run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
30-
- run: chmod +x ./cc-test-reporter
31-
- run: ./cc-test-reporter before-build
32-
- run: npm test
33-
- run: ./cc-test-reporter after-build -t lcov --exit-code $?
27+
version: 2
28+
jobs:
29+
node8:
30+
<<: *default
31+
docker:
32+
- image: circleci/node:8
33+
environment: *environment
34+
35+
node10:
36+
<<: *default
37+
docker:
38+
- image: circleci/node:10
39+
environment: *environment
40+
41+
workflows:
42+
version: 2
43+
build:
44+
jobs:
45+
- node8
46+
- node10

0 commit comments

Comments
 (0)