Skip to content

Commit f3fa1ae

Browse files
committed
Execute command to use a desired Node.js version
1 parent 0c54905 commit f3fa1ae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/windows_test_npm_install.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ jobs:
170170
- name: 'Print debug info'
171171
run: |
172172
. "${{ env.NVS_HOME }}/nvs.sh"
173+
nvs use ${{ matrix.NODE_VERSION }}
173174
echo 'PATH:'
174175
echo $PATH
175176
echo ''
@@ -198,6 +199,7 @@ jobs:
198199
- name: 'Update npm'
199200
run: |
200201
. "${{ env.NVS_HOME }}/nvs.sh"
202+
nvs use ${{ matrix.NODE_VERSION }}
201203
npm install -g npm@"${{ matrix.NPM_VERSION }}"
202204
npm --version
203205
timeout-minutes: 5
@@ -214,13 +216,15 @@ jobs:
214216
- name: 'Install Windows build tools'
215217
run: |
216218
. "${{ env.NVS_HOME }}/nvs.sh"
219+
nvs use ${{ matrix.NODE_VERSION }}
217220
npm install --global --production windows-build-tools
218221
timeout-minutes: 5
219222

220223
# Configure npm:
221224
- name: 'Configure npm'
222225
run: |
223226
. "${{ env.NVS_HOME }}/nvs.sh"
227+
nvs use ${{ matrix.NODE_VERSION }}
224228
npm config set python "$USERPROFILE/.windows-build-tools/python38"
225229
npm config set msvs_version 2017
226230
timeout-minutes: 2
@@ -243,6 +247,7 @@ jobs:
243247
- name: 'Run build task'
244248
run: |
245249
. "${{ env.NVS_HOME }}/nvs.sh"
250+
nvs use ${{ matrix.NODE_VERSION }}
246251
cd $GITHUB_WORKSPACE
247252
chmod +x ./tools/ci/github/script
248253
"./tools/ci/github/script" ${{ matrix.BUILD_TASK }} || "./tools/ci/github/script" ${{ matrix.BUILD_TASK }}
@@ -253,6 +258,7 @@ jobs:
253258
if: failure()
254259
run: |
255260
. "${{ env.NVS_HOME }}/nvs.sh"
261+
nvs use ${{ matrix.NODE_VERSION }}
256262
cd $GITHUB_WORKSPACE
257263
chmod +x ./tools/ci/github/on_failure
258264
"./tools/ci/github/on_failure" ${{ matrix.BUILD_TASK }}

0 commit comments

Comments
 (0)