angular/scripts/ci/run_angular_components_unit_tests.sh
Paul Gschwendtner df50af2bc5 ci: only build test targets for components repo unit test job (#44832)
To speed up the components CI job (avoiding it being a bottleneck in FW),
we will stop building everything in `src/...`, but rather only build targets
which are needed to run all tests within `src/...`.

This notably should avoid unnecessary NPM package building. Arguably that
part would also be valuable to have, but we already test the `ng_package`
rule in FW itself, plus we run snapshot tests in the components repo as well.

PR Close #44832
2022-01-27 09:22:23 -08:00

21 lines
652 B
Bash
Executable file

#!/usr/bin/env bash
set -u -e -o pipefail
# Script that runs all unit tests of the `angular/components` repository.
# Path to the Angular project.
angular_dir=$(pwd)
# Switch into the temporary directory where the `angular/components`
# repository has been cloned into.
cd ${COMPONENTS_REPO_TMP_DIR}
# Create a symlink for the Bazel binary installed through NPM, as running through Yarn introduces OOM errors.
./scripts/circleci/setup_bazel_binary.sh
# Now actually run the tests.
bazel test \
--build_tag_filters=-docs-package,-e2e,-browser:firefox-local \
--test_tag_filters=-e2e,-browser:firefox-local \
--build_tests_only \
-- src/...