From 65bb5eb9d63f7a0d016bdb51eaee4a6abc163199 Mon Sep 17 00:00:00 2001 From: mitchellhamilton Date: Sun, 24 Sep 2017 17:35:00 +1000 Subject: [PATCH 1/5] Run benchmarks and tests in parallel --- .travis.yml | 7 +++++++ package.json | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 57df3b86b..509f15ad4 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 diff --git a/package.json b/package.json index 0ac0106dd..28eac573a 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", @@ -15,7 +15,7 @@ "size": "bundlesize", "release": "npm run test && npm run build && lerna publish && git push --tags", "lint": "eslint . --fix", - "benchmark": "npm run build && lerna exec --scope benchmarks npm run benchmark", + "benchmark": "npm run rollup && lerna exec --scope benchmarks npm run benchmark", "start:site": "lerna exec --scope emotion-example-project npm run start:site", "build:site": "lerna exec --scope emotion-example-project npm run build:site", "watch": "lerna run --parallel watch", From c85610541f37a8e3f8b33cb2a80f7bcb33e59dce Mon Sep 17 00:00:00 2001 From: mitchellhamilton Date: Sun, 24 Sep 2017 17:39:57 +1000 Subject: [PATCH 2/5] Fix benchmark npm script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 28eac573a..5517970cd 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "size": "bundlesize", "release": "npm run test && npm run build && lerna publish && git push --tags", "lint": "eslint . --fix", - "benchmark": "npm run rollup && lerna exec --scope benchmarks npm run benchmark", + "benchmark": "npm run build && lerna exec --scope benchmarks npm run benchmark", "start:site": "lerna exec --scope emotion-example-project npm run start:site", "build:site": "lerna exec --scope emotion-example-project npm run build:site", "watch": "lerna run --parallel watch", From 2338f1aad38c962137226d9bf9cd2f1396068d1d Mon Sep 17 00:00:00 2001 From: mitchellhamilton Date: Sun, 24 Sep 2017 18:17:51 +1000 Subject: [PATCH 3/5] Cache site node_modules --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 509f15ad4..4228c78bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,3 +26,4 @@ after_success: cache: directories: - node_modules + - packages/site/node_modules From 03d5d4eeb12670d528c930c7a59220afeed035be Mon Sep 17 00:00:00 2001 From: mitchellhamilton Date: Sun, 24 Sep 2017 18:28:14 +1000 Subject: [PATCH 4/5] Add all package node_modules to travis cache --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4228c78bb..dd69f74a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,3 +27,11 @@ 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 + From 12a10e8d882488144e83e8ce00e78afd39d5d5e1 Mon Sep 17 00:00:00 2001 From: mitchellhamilton Date: Sun, 24 Sep 2017 18:37:01 +1000 Subject: [PATCH 5/5] Commit for travis build --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dd69f74a1..0dc75c3c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,4 +34,3 @@ cache: - packages/benchmarks/node_modules - packages/emotion-server/node_modules - packages/emotion/node_modules -