From 77bce67ffbf0cff86419a594417ee82df1dd5a98 Mon Sep 17 00:00:00 2001 From: Mitchell Hamilton Date: Mon, 25 Sep 2017 11:49:37 +1000 Subject: [PATCH] Run benchmarks and tests in parallel and cache packages node_modules (#333) * Run benchmarks and tests in parallel * Fix benchmark npm script * Cache site node_modules * Add all package node_modules to travis cache * Commit for travis build --- .travis.yml | 15 +++++++++++++++ package.json | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 57df3b86b..0dc75c3c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,17 @@ language: node_js node_js: - "8" +env: + matrix: + - NPM_SCRIPT=benchmark + - NPM_SCRIPT=test + cache: directories: - node_modules +script: npm run $NPM_SCRIPT + before_install: - npm install codecov @@ -19,3 +26,11 @@ after_success: cache: directories: - node_modules + - packages/site/node_modules + - packages/react-emotion/node_modules + - packages/preact-emotion/node_modules + - packages/babel-plugin-emotion/node_modules + - packages/emotion-utils/node_modules + - packages/benchmarks/node_modules + - packages/emotion-server/node_modules + - packages/emotion/node_modules diff --git a/package.json b/package.json index 0ac0106dd..5517970cd 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "build": "lerna run build --parallel", "test:size": "npm-run-all clean rollup:umd size", "clean": "lerna run clean --parallel", - "test": "npm-run-all -p lint:check coverage test:size && npm run benchmark", + "test": "npm-run-all -p lint:check coverage test:size", "coverage": "jest --coverage --no-cache --ci --runInBand", "lint:check": "eslint .", "test:watch": "jest --watch --no-cache",