1
- # Javascript Node CircleCI 2.0 configuration file
2
- #
3
- # Check https://circleci.com/docs/2.0/language-javascript/ for more details
4
- #
5
1
version : 2
6
2
jobs :
7
- test :
3
+ test-and-build :
4
+ working_directory : ~/repo
8
5
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
16
7
steps :
17
8
- checkout
18
- -
run :
sudo npm install -g [email protected]
19
9
- run : npm install
20
10
- run : npm run lint
21
11
# run the tests on the original source to get coverage info
@@ -25,31 +15,42 @@ jobs:
25
15
# test the final bundled builds
26
16
- run : npm run build
27
17
- 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
28
31
29
32
release :
33
+ working_directory : ~/repo
30
34
docker :
31
- - image : circleci/node:10
35
+ - image : circleci/node:12
32
36
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
44
42
45
43
workflows :
46
44
version : 2
47
45
test_and_release :
48
46
jobs :
49
- - test
47
+ - test-and-build
48
+ - test-node-support :
49
+ requires :
50
+ - test-and-build
50
51
- release :
51
52
requires :
52
- - test
53
+ - test-node-support
53
54
filters :
54
55
branches :
55
56
only : master
0 commit comments