ci: Update 1% payload size test (#20524)

PR Close #20524
This commit is contained in:
tinayuangao
2017-11-18 12:26:33 -08:00
committed by Miško Hevery
parent e2b76bb386
commit ac93f1235e
8 changed files with 40 additions and 62 deletions

View File

@ -0,0 +1,4 @@
{
"cli-hello-world":{"master":{"gzip7":{"inline":847,"main":42533,"polyfills":20207},"gzip9":{"inline":847,"main":42483,"polyfills":20204},"uncompressed":{"inline":1447,"main":154295,"polyfills":61254}}},
"hello_world__closure":{"master":{"gzip7":{"bundle":32793},"gzip9":{"bundle":32758},"uncompressed":{"bundle":100661}}}
}

View File

@ -1,19 +0,0 @@
#!/bin/bash
set -u -e -o pipefail
declare -A payloadLimits
payloadLimits["hello_world__closure", "uncompressed", "bundle"]=106000
payloadLimits["hello_world__closure", "gzip7", "bundle"]=35000
payloadLimits["hello_world__closure", "gzip9", "bundle"]=35000
payloadLimits["cli-hello-world", "uncompressed", "inline"]=1500
payloadLimits["cli-hello-world", "uncompressed", "main"]=160000
payloadLimits["cli-hello-world", "uncompressed", "polyfills"]=66000
payloadLimits["cli-hello-world", "gzip7", "inline"]=900
payloadLimits["cli-hello-world", "gzip7", "main"]=45000
payloadLimits["cli-hello-world", "gzip7", "polyfills"]=22000
payloadLimits["cli-hello-world", "gzip9", "inline"]=900
payloadLimits["cli-hello-world", "gzip9", "main"]=45000
payloadLimits["cli-hello-world", "gzip9", "polyfills"]=22000

View File

@ -4,9 +4,10 @@ set -e -o pipefail
cd `dirname $0`
readonly thisDir=$(cd $(dirname $0); pwd)
# Track payload size functions
source ../scripts/ci/payload-size.sh
source ./_payload-limits.sh
# Workaround https://github.com/yarnpkg/yarn/issues/2165
# Yarn will cache file://dist URIs and not update Angular code
@ -48,7 +49,7 @@ for testDir in $(ls | grep -v node_modules) ; do
if [[ $testDir == cli-hello-world ]]; then
yarn build
fi
trackPayloadSize "$testDir" "dist/*.js" true false
trackPayloadSize "$testDir" "dist/*.js" true false "${thisDir}/_payload-limits.json"
fi
)
done