2019-01-14 20:47:39 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -u -e -o pipefail
|
|
|
|
|
|
|
|
# This script runs unit tests from angular/material2.
|
|
|
|
|
|
|
|
# Save the dir for the root of the Angular repo.
|
|
|
|
angular_dir=$(pwd)
|
|
|
|
|
2019-03-18 14:25:19 -04:00
|
|
|
# Switch into Material directory.
|
|
|
|
cd ${MATERIAL_REPO_TMP_DIR}
|
2019-01-14 20:47:39 -05:00
|
|
|
|
2019-11-01 08:38:57 -04:00
|
|
|
# Updates Material's package.json to refer to the packages-dist directory.
|
test(ivy): update Material to recent commit from master branch (#31569)
Previously, the ivy-2019 branch of the Material (aka components) repo was
used, which contains some changes that were necessary to work with Ivy.
These changes are not longer necessary, as Material's master branch is
fully working with Ivy today. To be up-to-date with recent Material
development and its support for more recent dependencies, e.g. TypeScript,
it is desirable for us to be on a newer version of Material.
This commit moves the Material tests away from the ivy-2019 branch, to a
recent commit on master. We are not targeting the master branch itself,
as that would introduce a moving target into Angular's CI checks, which
is undesirable.
Lastly, the usage of gulp to run Material's tests is changed into using
Bazel, as Material itself is now also built with Bazel.
PR Close #31569
2019-06-13 15:06:14 -04:00
|
|
|
# Note that it's not necessary to perform a yarn install, as Bazel performs its own yarn install.
|
2019-11-01 08:38:57 -04:00
|
|
|
node ${angular_dir}/scripts/ci/update-deps-to-dist-packages.js ${MATERIAL_REPO_TMP_DIR}/package.json ${angular_dir}/dist/packages-dist/
|
2019-01-14 20:47:39 -05:00
|
|
|
|
2019-08-21 09:35:44 -04:00
|
|
|
# Copy the test blocklist into the "angular/components" repository. The components
|
|
|
|
# repository automatically picks up the blocklist and disables the specified tests.
|
|
|
|
cp ${angular_dir}/tools/material-ci/test-blocklist.ts ${MATERIAL_REPO_TMP_DIR}/test/
|
2019-08-20 19:15:20 -04:00
|
|
|
|
test(ivy): update Material to recent commit from master branch (#31569)
Previously, the ivy-2019 branch of the Material (aka components) repo was
used, which contains some changes that were necessary to work with Ivy.
These changes are not longer necessary, as Material's master branch is
fully working with Ivy today. To be up-to-date with recent Material
development and its support for more recent dependencies, e.g. TypeScript,
it is desirable for us to be on a newer version of Material.
This commit moves the Material tests away from the ivy-2019 branch, to a
recent commit on master. We are not targeting the master branch itself,
as that would introduce a moving target into Angular's CI checks, which
is undesirable.
Lastly, the usage of gulp to run Material's tests is changed into using
Bazel, as Material itself is now also built with Bazel.
PR Close #31569
2019-06-13 15:06:14 -04:00
|
|
|
# Create a symlink for the Bazel binary installed through NPM, as running through Yarn introduces OOM errors.
|
|
|
|
./scripts/circleci/setup_bazel_binary.sh
|
|
|
|
|
2019-09-06 05:36:36 -04:00
|
|
|
# Now actually run the tests. The dev-app and all its subpackages are excluded as they fail
|
|
|
|
# to compile due to limitations in Ivy's type checker (see FW-1352 and FW-1433)
|
|
|
|
bazel test --build_tag_filters=-docs-package,-e2e,-browser:firefox-local --test_tag_filters=-e2e,-browser:firefox-local --define=compile=aot -- src/... -src/dev-app/...
|