1- # Javascript Node CircleCI 2.0 configuration file
2- #
3- # Check https://circleci.com/docs/2.0/language-javascript/ for more details
4- #
51version : 2
62jobs :
7- test :
3+ test-and-build :
4+ working_directory : ~/repo
85 docker :
9- # specify the version you desire here
10- - image : circleci/node:10
11-
12- # Specify service dependencies here if necessary
13- # CircleCI maintains a library of pre-built images
14- # documented at https://circleci.com/docs/2.0/circleci-images/
15-
6+ - image : circleci/node:12
167 steps :
178 - checkout
18- -
run :
sudo npm install -g [email protected] 199 - run : npm install
2010 - run : npm run lint
2111 # run the tests on the original source to get coverage info
@@ -25,31 +15,42 @@ jobs:
2515 # test the final bundled builds
2616 - run : npm run build
2717 - run : npm run test-builds
18+ - persist_to_workspace :
19+ root : ~/repo
20+ paths : .
21+
22+ test-node-support :
23+ working_directory : ~/repo
24+ docker :
25+ - image : circleci/node:6
26+ steps :
27+ - attach_workspace :
28+ at : ~/repo
29+ # test the final build in Node 6 for platform support
30+ - run : npm run test-node-support
2831
2932 release :
33+ working_directory : ~/repo
3034 docker :
31- - image : circleci/node:10
35+ - image : circleci/node:12
3236 steps :
33- - checkout
34- - run :
35- name : Install dependencies
36- command : |
37- npm install
38- - run :
39- name : Build /dist folder
40- command : npm run build
41- - run :
42- name : Release to NPM
43- command : npm run semantic-release
37+ - attach_workspace :
38+ at : ~/repo
39+ # test the final bundled builds again right before release
40+ - run : npm run test-builds
41+ - run : npm run semantic-release
4442
4543workflows :
4644 version : 2
4745 test_and_release :
4846 jobs :
49- - test
47+ - test-and-build
48+ - test-node-support :
49+ requires :
50+ - test-and-build
5051 - release :
5152 requires :
52- - test
53+ - test-node-support
5354 filters :
5455 branches :
5556 only : master
0 commit comments