Travis CI cache: ignore specific folder / file from cache

I have the following configuration in my .travis.yml :

 language: node_js node_js: - '5.0.0' sudo: false cache: bundler: true directories: - node_modules 

One of my packages is the Github branch, where the content changes, but the version remains the same. It happens that the cache is not invalid, and at this moment there is nothing wrong. But I am wondering if there is a way to exclude a specific folder from the cache structure, something like these lines:

 language: node_js node_js: - '5.0.0' sudo: false cache: bundler: true directories: - node_modules - !node_modules/grommet 

Where !node_modules/grommet will be excluded from the cache index.

I tried using before_cache as described in here . But no luck.

Any help appreciated ...

+5
source share
1 answer

I had to reinstall the module manually. In your case, your travis.yml install section should look like this:

 install: - npm uninstall grommet - npm install 
+1
source

Source: https://habr.com/ru/post/1235386/


All Articles