I am trying to cache a command line tool needed for my build process. The tool is made out of NodeJS. The build succeeds, but I need it to run faster.
The relevant parts of my circle.yml look like this :
dependencies:
post:
- npm -g list
- if [ $(npm -g list | grep -c starrynight) -lt 1 ]; then npm install -g starrynight; else echo "StarryNight seems to be cached"; fi
test:
override:
- npm -g list
- starrynight run-tests --framework nightwatch
The second npm -g list
shows starrynight available for use, but the first one shows that it is not being cached.
echo $(npm prefix -g)
. . . gets me . . .
/home/ubuntu/nvm/v0.10.33
. . . so I am assuming CircleCI doesn't cache anything installed globally into nvm.
Nothing I have tried gets me my message, "StarryNight seems to be cached".
How can I cache starrynight?