George Kalpakas 176b3f12f4 ci: make integration_test job logs less verbose ()
The build and test progress logs make the CI log output so long that it
can't be displayed in the UI and one has to download and view the file
locally instead. This makes it harder to get to the interesting lines,
such as error messages.

Similar to , but for the `bazel-schematics` integration project.

PR Close 
2019-01-04 12:18:39 -08:00

38 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
set -eux -o pipefail
function testBazel() {
# Set up
bazel version
rm -rf demo
# Create project
ng new demo --collection=@angular/bazel --defaults --skip-git
cd demo
# Run build
# TODO(kyliau): Use `bazel build` for now. Running `ng build` requires
# node_modules to be available in project directory.
bazel build //src:bundle
# Run test
ng test
ng e2e
}
function testNonBazel() {
# Replace angular.json that uses Bazel builder with the default generated by CLI
cp ../angular.json.original ./angular.json
# TODO(kyliau) Remove this once the additional assertion is added to CLI
cp ../app.e2e-spec.ts ./e2e/src/
# TODO(kyliau) Remove this once web_package rule is in use
cp ../index.html ./src/
rm -rf dist src/main.dev.ts src/main.prod.ts
# Just make a symlink instead of full yarn install to expose node_modules
ln -s $(bazel info output_base)/external/npm/node_modules node_modules
ng build --progress=false
ng test --progress=false --watch=false
ng e2e --configuration=ci
}
testBazel
testNonBazel