@@ -4,25 +4,32 @@ unit_tests: &unit_tests
44 - restore_cache :
55 key : dependency-cache-{{ checksum "package-lock.json" }}
66 - 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
910 - run :
10- name : Run unit tests.
11+ name : NPM Install.
12+ command : npm ci || npm i
13+ - run :
14+ name : Run Test.
1115 command : npm run ci:test
1216canary_tests : &canary_tests
1317 steps :
1418 - checkout
1519 - restore_cache :
1620 key : dependency-cache-{{ checksum "package-lock.json" }}
1721 - 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
2027 - run :
21- name : Install Webpack Canary
28+ name : Install Webpack Canary.
2229 command : npm i --no-save webpack@next
2330 - 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
2633
2734version : 2
2835jobs :
@@ -34,91 +41,82 @@ jobs:
3441 - restore_cache :
3542 key : dependency-cache-{{ checksum "package-lock.json" }}
3643 - 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
3949 - save_cache :
4050 key : dependency-cache-{{ checksum "package-lock.json" }}
4151 paths :
4252 - ./node_modules
43-
44- node8-latest :
53+ analysis :
4554 docker :
46- - image : webpackcontrib/circleci-node8 :latest
55+ - image : webpackcontrib/circleci-node-base :latest
4756 steps :
4857 - checkout
4958 - restore_cache :
5059 key : dependency-cache-{{ checksum "package-lock.json" }}
5160 - run :
52- name : NPM Rebuild
53- command : npm install
61+ name : Install Latest NPM.
62+ command : npm i -g npm@latest
5463 - run :
55- name : Run unit tests .
56- command : npm run ci:coverage
64+ name : NPM Install .
65+ command : npm ci
5766 - 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
6175 node6-latest :
6276 docker :
6377 - image : webpackcontrib/circleci-node6:latest
6478 << : *unit_tests
65- node9-latest :
66- docker :
67- - image : webpackcontrib/circleci-node9:latest
68- << : *unit_tests
69- node8-canary :
79+ node8-latest :
7080 docker :
7181 - image : webpackcontrib/circleci-node8:latest
72- << : *canary_tests
73- analysis :
82+ << : *unit_tests
83+ node10-latest :
7484 docker :
75- - image : webpackcontrib/circleci-node-base :latest
85+ - image : webpackcontrib/circleci-node10 :latest
7686 steps :
7787 - checkout
7888 - restore_cache :
7989 key : dependency-cache-{{ checksum "package-lock.json" }}
8090 - 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
8693 - 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
9996 - 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
10599 - 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
108107
109- version : 2.0
110108workflows :
111109 version : 2
112- validate-publish :
110+ test :
113111 jobs :
114112 - dependency_cache
115- - node6-latest :
113+ - analysis :
116114 requires :
117115 - dependency_cache
118116 filters :
119117 tags :
120118 only : /.*/
121- - analysis :
119+ - node6-latest :
122120 requires :
123121 - dependency_cache
124122 filters :
@@ -131,26 +129,17 @@ workflows:
131129 filters :
132130 tags :
133131 only : /.*/
134- - node9 -latest :
132+ - node10 -latest :
135133 requires :
136134 - analysis
137135 - node6-latest
138136 filters :
139137 tags :
140138 only : /.*/
141- - node8 -canary :
139+ - node6 -canary :
142140 requires :
143141 - analysis
144142 - node6-latest
145143 filters :
146144 tags :
147145 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