سؤال

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.

هل كانت مفيدة؟

المحلول

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

نصائح أخرى

It is now possible to cache on public repositories if you switch to container-based architecture by adding sudo: false into your config file.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top