From 65d57a07e05eee7610821ef86f792010fe0717b6 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Tue, 10 Oct 2017 12:22:57 +0300 Subject: [PATCH] build(aio): avoid building before running the local PWA tests When this command is run on CI, `yarn build` has already been run, so this was unnecessarily building angular.io again (adding ~4mins to the `aio` job). When this command is run locally, it is most often about testing a new `lighthouse` version/config, so you don't need to build angular.io over and over (and if necessary, one can always run `yarn build` manually). Closes #19633 --- aio/package.json | 1 - scripts/ci/test-aio.sh | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/aio/package.json b/aio/package.json index 2f8e52f70f..de2ae7bee2 100644 --- a/aio/package.json +++ b/aio/package.json @@ -25,7 +25,6 @@ "presetup-local": "yarn presetup", "setup-local": "yarn aio-use-local && yarn example-use-local", "postsetup-local": "yarn postsetup", - "pretest-pwa-score-localhost": "yarn build", "test-pwa-score-localhost": "concurrently --kill-others --success first \"http-server dist -p 4200 --silent\" \"yarn test-pwa-score http://localhost:4200 90\"", "test-pwa-score": "node scripts/test-pwa-score", "example-e2e": "yarn example-check-local && node ./tools/examples/run-example-e2e", diff --git a/scripts/ci/test-aio.sh b/scripts/ci/test-aio.sh index cf543c79d2..6f4a143b9a 100755 --- a/scripts/ci/test-aio.sh +++ b/scripts/ci/test-aio.sh @@ -18,6 +18,13 @@ source ${thisDir}/_travis-fold.sh travisFoldEnd "test.aio.lint" + # Run PWA-score tests + # (Run before unit and e2e tests, which destroy the `dist/` directory.) + travisFoldStart "test.aio.pwaScore" + yarn test-pwa-score-localhost + travisFoldEnd "test.aio.pwaScore" + + # Run unit tests travisFoldStart "test.aio.unit" yarn test --single-run @@ -30,12 +37,6 @@ source ${thisDir}/_travis-fold.sh travisFoldEnd "test.aio.e2e" - # Run PWA-score tests - travisFoldStart "test.aio.pwaScore" - yarn test-pwa-score-localhost - travisFoldEnd "test.aio.pwaScore" - - # Run unit tests for aio/aio-builds-setup travisFoldStart "test.aio.aio-builds-setup" ./aio-builds-setup/scripts/test.sh