ci: fix e2e snapshots

Without this change the `e2e-cli-ng-snapshots` task fails with an npm error though to the installation of global packages

```
STDERR:
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm WARN @phenomnomnominal/tsquery@3.0.0 requires a peer of typescript@^3 but none is installed. You must install peer dependencies yourself.

npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR!
```
This commit is contained in:
Alan Agius 2019-04-23 09:00:30 +02:00 committed by Alex Eagle
parent 0a6df3e824
commit fd6f07b63d

View File

@ -130,8 +130,11 @@ jobs:
e2e-cli-ng-snapshots:
<<: *defaults
docker:
- image: *browsers_docker_image
environment:
BASH_ENV: ~/.profile
NPM_CONFIG_PREFIX: ~/.npm-global
resource_class: xlarge
parallelism: 4
steps:
@ -143,7 +146,7 @@ jobs:
circleci step halt
fi
- attach_workspace: *attach_options
- run: xvfb-run -a node ./tests/legacy-cli/run_e2e --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX} --ng-snapshots
- run: PATH=~/.npm-global/bin:$PATH xvfb-run -a node ./tests/legacy-cli/run_e2e --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX} --ng-snapshots
build:
<<: *defaults