Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Speeding up Travis-CI dependencies installation for AngularJs project

I've just started playing with Travis-CI and I managed to run my simple unit tests in a free version.

But even on a quite simple tests set I see significant delays related to the npm/bower dependencies installation steps.

Is there a way to reduce this phase time and not install same dependencies on every build.

I read about caching support in Travis, but almost all examples are focused on Ruby so it's not really clear how to deal with JS apps.

like image 629
Andrey Selitsky Avatar asked Feb 25 '14 19:02

Andrey Selitsky


1 Answers

Caching is only possible with Travis Pro right now, unfortunately. Travis is saying that it will open it up for open source projects at some point though :).

If you are a Travis Pro user or have sudo: false enabled, you can add the following to cache your node.js modules:

cache:
  directories:
    - node_modules
like image 87
joshua-anderson Avatar answered Sep 22 '22 14:09

joshua-anderson