Skip to content

Commit 65435be

Browse files
committed
ci: move npm prefix config to env helper script
1 parent 0f36563 commit 65435be

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.circleci/config.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ executors:
5353
docker:
5454
- image: cimg/node:<< parameters.nodeversion >>
5555
working_directory: ~/ng
56-
environment:
57-
NPM_CONFIG_PREFIX: ~/.npm-global
5856
resource_class: large
5957

6058
windows-executor:
@@ -202,12 +200,12 @@ jobs:
202200
name: Execute CLI E2E Tests
203201
command: |
204202
mkdir /mnt/ramdisk/e2e-main
205-
PATH=~/.npm-global/bin:$PATH node ./tests/legacy-cli/run_e2e --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX} <<# parameters.ve >>--ve<</ parameters.ve >> <<# parameters.snapshots >>--ng-snapshots<</ parameters.snapshots >> --tmpdir=/mnt/ramdisk/e2e-main
203+
node ./tests/legacy-cli/run_e2e --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX} <<# parameters.ve >>--ve<</ parameters.ve >> <<# parameters.snapshots >>--ng-snapshots<</ parameters.snapshots >> --tmpdir=/mnt/ramdisk/e2e-main
206204
- run:
207205
name: Execute CLI E2E Tests Subset with Yarn
208206
command: |
209207
mkdir /mnt/ramdisk/e2e-yarn
210-
PATH=~/.npm-global/bin:$PATH node ./tests/legacy-cli/run_e2e --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX} <<# parameters.ve >>--ve<</ parameters.ve >> <<# parameters.snapshots >>--ng-snapshots<</ parameters.snapshots >> --yarn --tmpdir=/mnt/ramdisk/e2e-yarn --glob="{tests/basic/**,tests/update/**}"
208+
node ./tests/legacy-cli/run_e2e --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX} <<# parameters.ve >>--ve<</ parameters.ve >> <<# parameters.snapshots >>--ng-snapshots<</ parameters.snapshots >> --yarn --tmpdir=/mnt/ramdisk/e2e-yarn --glob="{tests/basic/**,tests/update/**}"
211209
212210
test-browsers:
213211
executor:
@@ -230,8 +228,8 @@ jobs:
230228
# Waits for the Saucelabs tunnel to be ready. This ensures that we don't run tests
231229
# too early without Saucelabs not being ready.
232230
- run: ./scripts/saucelabs/wait-for-tunnel.sh
233-
- run: PATH=~/.npm-global/bin:$PATH node ./tests/legacy-cli/run_e2e ./tests/legacy-cli/e2e/tests/misc/browsers.ts --ve
234-
- run: PATH=~/.npm-global/bin:$PATH node ./tests/legacy-cli/run_e2e ./tests/legacy-cli/e2e/tests/misc/browsers.ts
231+
- run: node ./tests/legacy-cli/run_e2e ./tests/legacy-cli/e2e/tests/misc/browsers.ts --ve
232+
- run: node ./tests/legacy-cli/run_e2e ./tests/legacy-cli/e2e/tests/misc/browsers.ts
235233
- run: ./scripts/saucelabs/stop-tunnel.sh
236234

237235
build:

.circleci/env.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ echo "source $envHelpersPath;" >> $BASH_ENV;
1515
# See https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables for more info.
1616
####################################################################################################
1717
setPublicVar PROJECT_ROOT "$projectDir";
18+
setPublicVar NPM_CONFIG_PREFIX "${HOME}/.npm-global";
19+
setPublicVar PATH "${HOME}/.npm-global/bin:${PATH}";
1820

1921
####################################################################################################
2022
# Define SauceLabs environment variables for CircleCI.

0 commit comments

Comments
 (0)