Skip to content

Commit

Permalink
ci(docs-infra): check and track payload sizes for test_aio_local an…
Browse files Browse the repository at this point in the history
…d `test_aio_local_ivy` (angular#31047)

PR Close angular#31047
  • Loading branch information
gkalpak authored and AndrewKushnir committed Jun 14, 2019
1 parent a6cb20c commit c596795
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Expand Up @@ -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
Expand All @@ -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
Expand Down
24 changes: 24 additions & 0 deletions aio/scripts/_payload-limits.json
Expand Up @@ -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
}
}
}
}
4 changes: 2 additions & 2 deletions aio/scripts/payload.sh
Expand Up @@ -4,12 +4,12 @@ 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

# 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"

0 comments on commit c596795

Please sign in to comment.