From c596795e6475524e53418653cdabeeed2d25852d Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Fri, 14 Jun 2019 13:01:37 +0300 Subject: [PATCH] ci(docs-infra): check and track payload sizes for `test_aio_local` and `test_aio_local_ivy` (#31047) PR Close #31047 --- .circleci/config.yml | 4 ++++ aio/scripts/_payload-limits.json | 24 ++++++++++++++++++++++++ aio/scripts/payload.sh | 4 ++-- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index def9dd5e8c9c0..9c2334e6e1529 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -289,6 +289,8 @@ jobs: - run: yarn --cwd aio e2e --configuration=ci # Run PWA-score tests - run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE + # Check the bundle sizes. + - run: yarn --cwd aio payload-size aio-local test_aio_local_ivy: <<: *job_defaults @@ -306,6 +308,8 @@ jobs: - run: yarn --cwd aio e2e --configuration=ci # Run PWA-score tests - run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE + # Check the bundle sizes. + - run: yarn --cwd aio payload-size aio-local-ivy test_aio_tools: <<: *job_defaults diff --git a/aio/scripts/_payload-limits.json b/aio/scripts/_payload-limits.json index 9dc6b8b6fb2b0..cebe49cf8517f 100755 --- a/aio/scripts/_payload-limits.json +++ b/aio/scripts/_payload-limits.json @@ -10,5 +10,29 @@ "polyfills-es2015": 53295 } } + }, + "aio-local": { + "master": { + "uncompressed": { + "runtime-es5": 3005, + "runtime-es2015": 3011, + "main-es5": 511054, + "main-es2015": 450560, + "polyfills-es5": 129161, + "polyfills-es2015": 53295 + } + } + }, + "aio-local-ivy": { + "master": { + "uncompressed": { + "runtime-es5": 2895, + "runtime-es2015": 2901, + "main-es5": 564586, + "main-es2015": 582731, + "polyfills-es5": 129161, + "polyfills-es2015": 53295 + } + } } } diff --git a/aio/scripts/payload.sh b/aio/scripts/payload.sh index 0ab4b73fb91de..72ee70a636182 100755 --- a/aio/scripts/payload.sh +++ b/aio/scripts/payload.sh @@ -4,6 +4,7 @@ set -eu -o pipefail readonly thisDir=$(cd $(dirname $0); pwd) readonly parentDir=$(dirname $thisDir) +readonly target=${1:-aio} # Track payload size functions source ../scripts/ci/payload-size.sh @@ -11,5 +12,4 @@ source ../scripts/ci/payload-size.sh # Provide node_modules from aio NODE_MODULES_BIN=$PROJECT_ROOT/aio/node_modules/.bin/ -trackPayloadSize "aio" "dist/*.js" true true "${thisDir}/_payload-limits.json" - +trackPayloadSize "$target" "dist/*.js" true true "${thisDir}/_payload-limits.json"