Skip to content

Commit dbbb656

Browse files
serimakt3k
authored andcommitted
Run the tests on Node.js version 10 (#2601)
1 parent 7c56830 commit dbbb656

File tree

1 file changed

+55
-30
lines changed

1 file changed

+55
-30
lines changed

.circleci/config.yml

+55-30
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,85 @@
11
version: 2
2-
jobs:
3-
test:
4-
docker:
5-
- image: circleci/node:8-browsers
6-
steps:
7-
- checkout
8-
- run: |
2+
3+
node8: &node8
4+
working_directory: ~/c3
5+
docker:
6+
- image: circleci/node:8-browsers
7+
8+
node10: &node10
9+
working_directory: ~/c3
10+
docker:
11+
- image: circleci/node:10-browsers
12+
13+
restore_modules_cache: &restore_modules_cache
14+
restore_cache:
15+
keys:
16+
- npm-4-{{ checksum "package.json" }}
17+
# fallback to using the latest cache if no exact match is found
18+
- npm-4-
19+
20+
save_modules_cache: &save_modules_cache
21+
save_cache:
22+
key: npm-4-{{ checksum "package.json" }}
23+
paths: ./node_modules
24+
25+
install_and_test: &install_and_test
26+
steps:
27+
- checkout
28+
- run:
29+
name: Display versions
30+
command: |
931
echo "node $(node -v)"
1032
echo "npm v$(npm --version)"
1133
echo "$(google-chrome --version)"
12-
- restore_cache:
13-
key: npm-3-{{ checksum "package.json" }}
14-
- run: npm install
15-
- save_cache:
16-
key: npm-3-{{ checksum "package.json" }}
17-
paths:
18-
- ./node_modules
19-
- run: npm test
20-
- run: npm run codecov
21-
- store_artifacts:
22-
path: htdocs
23-
destination: htdocs
24-
- run: npx status-back -s -c circleci/htdocs -r c3js/c3 "preview build succes!" "https://${CIRCLE_BUILD_NUM}-11496279-gh.circle-artifacts.com/0/htdocs/index.html"
34+
- *restore_modules_cache
35+
- run:
36+
name: Installing Dependencies
37+
command: npm install
38+
- *save_modules_cache
39+
- run: npm test
40+
- run: npm run codecov
41+
- store_artifacts:
42+
path: htdocs
43+
destination: htdocs
44+
- run: npx status-back -s -c circleci/htdocs -r c3js/c3 "preview build succes!" "https://${CIRCLE_BUILD_NUM}-11496279-gh.circle-artifacts.com/0/htdocs/index.html"
45+
46+
jobs:
47+
test_on_node8:
48+
<<: *node8
49+
<<: *install_and_test
50+
51+
test_on_node10:
52+
<<: *node10
53+
<<: *install_and_test
54+
2555
docs:
2656
docker:
2757
- image: circleci/ruby:2.4-node
2858
env:
2959
BUNDLE_PATH: vendor/bundle
3060
steps:
3161
- checkout
32-
3362
- restore_cache:
3463
key: deps-bundle-{{ checksum "Gemfile.lock" }}
3564
- run: bundle install
3665
- save_cache:
3766
key: deps-bundle-{{ checksum "Gemfile.lock" }}
3867
paths:
3968
- vendor/bundle
40-
41-
- restore_cache:
42-
key: npm-3-{{ checksum "package.json" }}
69+
- *restore_modules_cache
4370
- run: npm install
44-
- save_cache:
45-
key: npm-3-{{ checksum "package.json" }}
46-
paths:
47-
- ./node_modules
48-
71+
- *save_modules_cache
4972
- run: npm run build
5073
- run: npm run copy-to-docs
5174
- run: npm run build:docs
5275
- store_artifacts:
5376
path: build
5477
destination: docs
78+
5579
workflows:
5680
version: 2
5781
test:
5882
jobs:
59-
- test
83+
- test_on_node8
84+
- test_on_node10
6085
- docs

0 commit comments

Comments
 (0)