Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

improve caching performance in CI (#3310)

Christopher Hiller4ae26b286c08
diff --git a/.travis.yml b/.travis.yml
index ffbbb5d4..f7e9df92 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,7 @@
# these are executed in order. each must pass for the next to be run
stages:
- smoke # this ensures a "user" install works properly
+ - precache # warm up cache for default Node.js version
- lint # lint code and docs
- test # all tests
@@ -20,13 +21,18 @@ jobs:
- &node
script: npm start test.node
node_js: '8'
- cache: false
- <<: *node
node_js: '6'
+ cache:
+ directories:
+ - node_modules
- <<: *node
node_js: '4'
+ cache:
+ directories:
+ - node_modules
- script: npm start test.bundle test.browser
before_script: mkdir -p .karma
@@ -56,6 +62,9 @@ jobs:
- <<: *smoke
node_js: '4'
+ - stage: precache
+ script: true
+
notifications:
email: false
urls: