☕️ Classic, reliable, trusted test framework for Node.js and the browser
further build improvements (#3315)
Christopher Hiller7544bd3b281d
diff --git a/.travis.yml b/.travis.ymlindex f7e9df92..0bbb7dd2 100644--- a/.travis.yml+++ b/.travis.yml@@ -8,10 +8,21 @@ stages:# defaultslanguage: node_jsnode_js: '9'+env: PATH=~/npm/node_modules/.bin:$PATH+# `nvm install` happens before the cache is restored, which means+# we must install our own npm elsewhere (`~/npm`)+before_install: |+ [[ ! -x ~/npm/node_modules/.bin/npm ]] && {+ # caching feature creates `~/npm` for us+ cd ~/npm && npm install npm+ cd -+ } || true+# this avoids compilation in most cases (where we don't need it)+install: npm ci --ignore-scriptscache:directories:- - ~/.npm- - node_modules+ - ~/.npm # cache npm's cache+ - ~/npm # cache latest npmjobs:include:@@ -24,18 +35,12 @@ jobs:- <<: *nodenode_js: '6'- cache:- directories:- - node_modules- <<: *nodenode_js: '4'- cache:- directories:- - node_modules- script: npm start test.bundle test.browser- before_script: mkdir -p .karma+ install: npm ci # we need the native modules hereaddons:artifacts:paths:@@ -47,11 +52,18 @@ jobs:- stage: lintscript: npm start lint+ # smoke tests use default npm.- &smokestage: smoke- env: NPM_CONFIG_PRODUCTION=1+ env: null+ before_install: true+ install: npm install --production+ # `--opts /dev/null` means "ignore test/mocha.opts"script: ./bin/mocha --opts /dev/null --reporter spec test/sanity/sanity.spec.js- cache: false+ cache:+ directories:+ - ~/.npm+ - node_modules # npm install, unlike npm ci, doesn't wipe node_modules- <<: *smokenode_js: '8'