Skip to content

Conversation

@boneskull
Copy link
Member

This change "warms up" the npm caches for Node.js 9 jobs, since it will be reused during the build. It re-enables caching for Node.js 8, 6 and 4, since I RTFM'd more closely. 😬

From the Travis-CI docs:

There is one cache per branch and language version/ compiler version/ JDK version/ Gemfile location/ etc.

  1. for the smoke tests, we do a production only install per node.js version. we do NOT want to cache node_modules or ~/.npm, since it should always reflect what a user would get.
  2. we warm up the cache; basically this runs a full npm install for node.js 9 with no global environment variables
  3. we lint, using the warmed-up cache
  4. tests:
  • we run node.js tests in 9 and browser tests using the warmed-up cache
  • we run node.js tests in v6 and v4 using a node_modules-only cache. these are not reused during the build (unlike the node 9 caches), but may be reused during subsequent builds against the same branch.

default version is 9, currently.

Signed-off-by: Christopher Hiller <[email protected]>
@boneskull boneskull added qa semver-patch implementation requires increase of "patch" version number; "bug fixes" labels Apr 4, 2018
@coveralls
Copy link

Coverage Status

Coverage remained the same at 89.955% when pulling b9d0397 on precache into ff9f3cf on master.

@boneskull
Copy link
Member Author

I'm going to go ahead and merge this because it seems to work. Mainly just wanted to explain myself.

@boneskull boneskull merged commit 4ae26b2 into master Apr 5, 2018
@boneskull boneskull deleted the precache branch April 5, 2018 03:13
@boneskull boneskull added this to the v5.1.0 milestone Apr 7, 2018
sgilroy pushed a commit to TwineHealth/mocha that referenced this pull request Feb 27, 2019
* add precache stage to warm cache for jobs based default Node.js version
* re-enable caching for node tests of v6 and v4

Signed-off-by: Christopher Hiller <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-patch implementation requires increase of "patch" version number; "bug fixes"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants