@@ -19,12 +19,17 @@ workflows:
1919 filters :
2020 tags :
2121 only : /.*/
22+ - node10 :
23+ filters :
24+ tags :
25+ only : /.*/
2226 - lint :
2327 requires :
2428 - node4
2529 - node6
2630 - node8
2731 - node9
32+ - node10
2833 filters :
2934 tags :
3035 only : /.*/
@@ -34,6 +39,7 @@ workflows:
3439 - node6
3540 - node8
3641 - node9
42+ - node10
3743 filters :
3844 tags :
3945 only : /.*/
@@ -90,14 +96,18 @@ jobs:
9096 else
9197 echo "Not a nightly build, skipping this step."
9298 fi
93- - run :
94- name : Install modules and dependencies.
95- command : |-
99+ - run : &npm_install_and_link
100+ name : Install and link the module.
101+ command : |
102+ mkdir -p /home/node/.npm-global
96103 npm install
97104 repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools"
98105 if ! test -x "$repo_tools"; then
99106 chmod +x "$repo_tools"
100107 fi
108+ npm link
109+ environment :
110+ NPM_CONFIG_PREFIX : /home/node/.npm-global
101111 - run :
102112 name : Run unit tests.
103113 command : npm test
@@ -120,26 +130,20 @@ jobs:
120130 - image : ' node:9'
121131 user : node
122132 steps : *unit_tests_steps
133+ node10 :
134+ docker :
135+ - image : ' node:10'
136+ user : node
137+ steps : *unit_tests_steps
123138 lint :
124139 docker :
125140 - image : ' node:8'
126141 user : node
127142 steps :
128143 - checkout
129144 - run : *remove_package_lock
130- - run :
131- name : Install modules and dependencies.
132- command : |
133- mkdir -p /home/node/.npm-global
134- npm install
135- repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools"
136- if ! test -x "$repo_tools"; then
137- chmod +x "$repo_tools"
138- fi
139- npm link
140- environment :
141- NPM_CONFIG_PREFIX : /home/node/.npm-global
142- - run :
145+ - run : *npm_install_and_link
146+ - run : &samples_npm_install_and_link
143147 name : Link the module being tested to the samples.
144148 command : |
145149 cd samples/
@@ -160,14 +164,7 @@ jobs:
160164 steps :
161165 - checkout
162166 - run : *remove_package_lock
163- - run :
164- name : Install modules and dependencies.
165- command : |-
166- npm install
167- repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools"
168- if ! test -x "$repo_tools"; then
169- chmod +x "$repo_tools"
170- fi
167+ - run : *npm_install_and_link
171168 - run :
172169 name : Build documentation.
173170 command : npm run docs
@@ -184,27 +181,8 @@ jobs:
184181 openssl aes-256-cbc -d -in .circleci/key.json.enc \
185182 -out .circleci/key.json \
186183 -k "${SYSTEM_TESTS_ENCRYPTION_KEY}"
187- - run :
188- name : Install and link the module.
189- command : |
190- mkdir -p /home/node/.npm-global
191- npm install
192- repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools"
193- if ! test -x "$repo_tools"; then
194- chmod +x "$repo_tools"
195- fi
196- npm link
197- environment :
198- NPM_CONFIG_PREFIX : /home/node/.npm-global
199- - run :
200- name : Link the module being tested to the samples.
201- command : |
202- cd samples/
203- npm link @google-cloud/spanner
204- npm install
205- cd ..
206- environment :
207- NPM_CONFIG_PREFIX : /home/node/.npm-global
184+ - run : *npm_install_and_link
185+ - run : *samples_npm_install_and_link
208186 - run :
209187 name : Run sample tests.
210188 command : npm run samples-test
@@ -230,14 +208,7 @@ jobs:
230208 openssl aes-256-cbc -d -in .circleci/key.json.enc \
231209 -out .circleci/key.json \
232210 -k "${SYSTEM_TESTS_ENCRYPTION_KEY}"
233- - run :
234- name : Install modules and dependencies.
235- command : |-
236- npm install
237- repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools"
238- if ! test -x "$repo_tools"; then
239- chmod +x "$repo_tools"
240- fi
211+ - run : *npm_install_and_link
241212 - run :
242213 name : Run system tests.
243214 command : npm run system-test
0 commit comments