@@ -4,25 +4,32 @@ unit_tests: &unit_tests
4
4
- restore_cache :
5
5
key : dependency-cache-{{ checksum "package-lock.json" }}
6
6
- run :
7
- name : NPM Rebuild
8
- command : npm install
7
+ name : Install Latest NPM.
8
+ # npm@3 is buggy
9
+ command : if [[ $(npm -v | cut -c -1) > 3 ]] ; then npm i -g npm@latest; else echo "Skip npm updating"; fi
9
10
- run :
10
- name : Run unit tests.
11
+ name : NPM Install.
12
+ command : npm ci || npm i
13
+ - run :
14
+ name : Run Test.
11
15
command : npm run ci:test
12
16
canary_tests : &canary_tests
13
17
steps :
14
18
- checkout
15
19
- restore_cache :
16
20
key : dependency-cache-{{ checksum "package-lock.json" }}
17
21
- run :
18
- name : NPM Rebuild
19
- command : npm install
22
+ name : Install Latest NPM.
23
+ command : npm i -g npm@latest
24
+ - run :
25
+ name : NPM Install.
26
+ command : npm ci
20
27
- run :
21
- name : Install Webpack Canary
28
+ name : Install Webpack Canary.
22
29
command : npm i --no-save webpack@next
23
30
- run :
24
- name : Run unit tests .
25
- command : if [[ $(compver --name webpack --gte next --lt latest) < 1 ]] ; then printf "Next is older than Latest - Skipping Canary Suite"; else npm run ci:test ; fi
31
+ name : Run Test .
32
+ command : if [[ $(compver --name webpack --gte next --lt latest) < 1 ]] ; then printf "Next is older than Latest - Skipping Canary Suite"; else npm run ci:test; fi
26
33
27
34
version : 2
28
35
jobs :
@@ -34,91 +41,82 @@ jobs:
34
41
- restore_cache :
35
42
key : dependency-cache-{{ checksum "package-lock.json" }}
36
43
- run :
37
- name : Install Dependencies
38
- command : npm install
44
+ name : Install Latest NPM.
45
+ command : npm i -g npm@latest
46
+ - run :
47
+ name : NPM Install.
48
+ command : npm ci
39
49
- save_cache :
40
50
key : dependency-cache-{{ checksum "package-lock.json" }}
41
51
paths :
42
52
- ./node_modules
43
-
44
- node8-latest :
53
+ analysis :
45
54
docker :
46
- - image : webpackcontrib/circleci-node8 :latest
55
+ - image : webpackcontrib/circleci-node-base :latest
47
56
steps :
48
57
- checkout
49
58
- restore_cache :
50
59
key : dependency-cache-{{ checksum "package-lock.json" }}
51
60
- run :
52
- name : NPM Rebuild
53
- command : npm install
61
+ name : Install Latest NPM.
62
+ command : npm i -g npm@latest
54
63
- run :
55
- name : Run unit tests .
56
- command : npm run ci:coverage
64
+ name : NPM Install .
65
+ command : npm ci
57
66
- run :
58
- name : Submit coverage data to codecov.
59
- command : bash <(curl -s https://codecov.io/bash)
60
- when : on_success
67
+ name : Run linting.
68
+ command : npm run lint
69
+ - run :
70
+ name : Run NPM Audit.
71
+ command : npm run security
72
+ - run :
73
+ name : Validate Commit Messages.
74
+ command : npm run ci:lint:commits
61
75
node6-latest :
62
76
docker :
63
77
- image : webpackcontrib/circleci-node6:latest
64
78
<< : *unit_tests
65
- node9-latest :
66
- docker :
67
- - image : webpackcontrib/circleci-node9:latest
68
- << : *unit_tests
69
- node8-canary :
79
+ node8-latest :
70
80
docker :
71
81
- image : webpackcontrib/circleci-node8:latest
72
- << : *canary_tests
73
- analysis :
82
+ << : *unit_tests
83
+ node10-latest :
74
84
docker :
75
- - image : webpackcontrib/circleci-node-base :latest
85
+ - image : webpackcontrib/circleci-node10 :latest
76
86
steps :
77
87
- checkout
78
88
- restore_cache :
79
89
key : dependency-cache-{{ checksum "package-lock.json" }}
80
90
- run :
81
- name : NPM Rebuild
82
- command : npm install
83
- - run :
84
- name : Run linting.
85
- command : npm run lint
91
+ name : Install Latest NPM.
92
+ command : npm i -g npm@latest
86
93
- run :
87
- name : Run NSP Security Check.
88
- command : npm run security
89
- # - run:
90
- # name: Validate Commit Messages
91
- # command: npm run ci:lint:commits
92
- publish :
93
- docker :
94
- - image : webpackcontrib/circleci-node-base:latest
95
- steps :
96
- - checkout
97
- - restore_cache :
98
- key : dependency-cache-{{ checksum "package-lock.json" }}
94
+ name : NPM Install.
95
+ command : npm ci
99
96
- run :
100
- name : NPM Rebuild
101
- command : npm install
102
- # - run:
103
- # name: Validate Commit Messages
104
- # command: npm run release:validate
97
+ name : Run Test.
98
+ command : npm run ci:coverage
105
99
- run :
106
- name : Publish to NPM
107
- command : printf "noop running conventional-github-releaser"
100
+ name : Submit coverage data to codecov.
101
+ command : bash <(curl -s https://codecov.io/bash)
102
+ when : on_success
103
+ node6-canary :
104
+ docker :
105
+ - image : webpackcontrib/circleci-node10:latest
106
+ << : *canary_tests
108
107
109
- version : 2.0
110
108
workflows :
111
109
version : 2
112
- validate-publish :
110
+ test :
113
111
jobs :
114
112
- dependency_cache
115
- - node6-latest :
113
+ - analysis :
116
114
requires :
117
115
- dependency_cache
118
116
filters :
119
117
tags :
120
118
only : /.*/
121
- - analysis :
119
+ - node6-latest :
122
120
requires :
123
121
- dependency_cache
124
122
filters :
@@ -131,26 +129,17 @@ workflows:
131
129
filters :
132
130
tags :
133
131
only : /.*/
134
- - node9 -latest :
132
+ - node10 -latest :
135
133
requires :
136
134
- analysis
137
135
- node6-latest
138
136
filters :
139
137
tags :
140
138
only : /.*/
141
- - node8 -canary :
139
+ - node6 -canary :
142
140
requires :
143
141
- analysis
144
142
- node6-latest
145
143
filters :
146
144
tags :
147
145
only : /.*/
148
- - publish :
149
- requires :
150
- - node8-latest
151
- - node8-canary
152
- - node9-latest
153
- filters :
154
- branches :
155
- only :
156
- - master
0 commit comments