Skip to content

Commit d04b340

Browse files
committed
chore(ci): fix nvm error on configuring functional tests npm production environment
1 parent 27abb15 commit d04b340

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.circleci/config.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,11 @@ commands:
120120
- run:
121121
## (See #1082 for rationale).
122122
name: run functional tests in npm production environment
123-
command: npm run test-functional
123+
command: |
124+
nvm --help && nvm run npm run test-functional
125+
nvm --help || (
126+
NPM_CONFIG_PREFIX=~/.npm-global npm run test-functional
127+
)
124128
environment:
125129
TEST_PRODUCTION_MODE: 1
126130
CI_RETRY_ONCE: << parameters.retry_once >>
@@ -131,7 +135,11 @@ commands:
131135
- run:
132136
## (See #1639 for rationale).
133137
name: run functional tests in npm legacy bundling mode
134-
command: npm run test-functional
138+
command: |
139+
nvm --help && nvm run npm run test-functional
140+
nvm --help || (
141+
NPM_CONFIG_PREFIX=~/.npm-global npm run test-functional
142+
)
135143
environment:
136144
TEST_PRODUCTION_MODE: 1
137145
TEST_LEGACY_BUNDLING: 1
@@ -156,7 +164,6 @@ commands:
156164
steps:
157165
# NOTE: keep the following steps compatible with both bash and cmd.exe
158166
- run: cd .. && mkdir .npm-global
159-
- run: npm config set prefix '../.npm-global'
160167

161168
jobs:
162169
build:

0 commit comments

Comments
 (0)