Igor Minar 04ca3bcf10 ci: move local and saucelabs unit tests to circle (#27937)
Moving the tests over to CircleCI in pretty much "as-is" state just so that we can drop the dependency on Travis.

In the followup changes we plan to migrate these tests to run on sauce under bazel. @gregmagolan is working on that.

I've previously verified that all the tests executed in legacy-unit-tests-local already under bazel.
Therefore the legacy-unit-tests-local job is strictly not necessary any more, but given how flaky legacy-unit-tests-saucelabs is,
it is good to have the -local job just so that we can quickly determine if any failure is a flake or legit issue
(the bazel version of these tests could theoretically run in a slightly different way and fail or not fail in a different way, so having -lcoal job is just an extra safety check).

This change was coauthored with @devversion

PR Close #27937
2019-01-07 15:35:09 -08:00

37 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
set -u -e -o pipefail
# Setup environment
readonly thisDir=$(cd $(dirname $0); pwd)
source ${thisDir}/_travis-fold.sh
# If the previous commands in the `script` section of .travis.yaml failed, then abort.
# The variable is not set in early stages of the build, so we default to 0 there.
# https://docs.travis-ci.com/user/environment-variables/
if [[ ${TRAVIS_TEST_RESULT=0} == 1 ]]; then
exit 1;
fi
# No build needed for bazel or aio docs tests
if [[ ${CI_MODE:-} == "bazel" ]]; then
exit 0;
fi
travisFoldStart "tsc tools"
# TODO: I think these three can be deleted... but I'm not sure
# let's delete them one at a time and test on CI
$(npm bin)/tsc -p tools
$(npm bin)/tsc -p packages/compiler/tsconfig-tools.json
$(npm bin)/tsc -p packages/compiler-cli/tsconfig-tools.json
travisFoldEnd "tsc tools"
travisFoldStart "tsc all"
node dist/tools/@angular/compiler-cli/src/main -p packages/tsconfig-metadata.json
$(npm bin)/tsc -p packages
$(npm bin)/tsc -p packages/examples
$(npm bin)/tsc -p modules
travisFoldEnd "tsc all"