ci: Add back the CLI integration test with pinning (#21555)

The CLI app is now checked in, rather than generated dynamically with
`ng new`. This loses some assertion power, but gains hermeticity.
It also checks in lock files for all integration tests, avoiding
floating version numbers.

We'll need another place to integration test between changes in
the various repositories - but the angular/angular PR-blocking status
is not the right place to do this.

PR Close #21555
This commit is contained in:
Alex Eagle
2018-01-16 07:09:59 -08:00
committed by Misko Hevery
parent 56f3e18c1c
commit 87e06d765e
42 changed files with 22984 additions and 100 deletions

View File

@ -19,22 +19,6 @@ rm_cache
mkdir $cache
trap rm_cache EXIT
# cli-hello-world test is disabled because it uses un-pinned dependencies
# TODO(alexeagle): re-enable when it's pinned
# # We need to install `ng` but don't want to do it globally so we place it into `.ng-cli` folder.
# (
# mkdir -p .ng-cli
# cd .ng-cli
# # workaround for https://github.com/yarnpkg/yarn/pull/4464 which causes cli to be installed into the root node_modules
# echo '{"name": "ng-cli"}' > package.json
# yarn init -y
# yarn add @angular/cli@$ANGULAR_CLI_VERSION --cache-folder ../$cache
# )
# ./ng-cli-create.sh cli-hello-world
for testDir in $(ls | grep -v node_modules) ; do
[[ -d "$testDir" ]] || continue
echo "#################################"
@ -42,8 +26,6 @@ for testDir in $(ls | grep -v node_modules) ; do
echo "#################################"
(
cd $testDir
# Workaround for https://github.com/yarnpkg/yarn/issues/2256
rm -f yarn.lock
rm -rf dist
yarn install --cache-folder ../$cache
yarn test || exit 1
@ -52,9 +34,13 @@ for testDir in $(ls | grep -v node_modules) ; do
if [[ $testDir == cli-hello-world ]]; then
yarn build
fi
trackPayloadSize "$testDir" "dist/*.js" true false "${thisDir}/_payload-limits.json"
if [[ -v TRAVIS ]]; then
trackPayloadSize "$testDir" "dist/*.js" true false "${thisDir}/_payload-limits.json"
fi
fi
)
done
trackPayloadSize "umd" "../dist/packages-dist/*/bundles/*.umd.min.js" false false
if [[ -v TRAVIS ]]; then
trackPayloadSize "umd" "../dist/packages-dist/*/bundles/*.umd.min.js" false false
fi