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
This commit is contained in:

committed by
Kara Erickson

parent
c1dacdd890
commit
04ca3bcf10
@ -20,6 +20,8 @@ if [[ ${CI_MODE:-} == "bazel" ]]; then
|
||||
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
|
||||
|
@ -5,64 +5,11 @@ set -u -e -o pipefail
|
||||
TRAVIS=${TRAVIS:-}
|
||||
CI_MODE=${CI_MODE:-}
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
mkdir -p ${LOGS_DIR}
|
||||
|
||||
|
||||
# TODO: install nvm?? it's already on travis so we don't need it
|
||||
#curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
|
||||
|
||||
|
||||
# Install node
|
||||
#nvm install ${NODE_VERSION}
|
||||
|
||||
|
||||
# Install version of yarn that we are locked against
|
||||
travisFoldStart "install-yarn"
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version "${YARN_VERSION}"
|
||||
travisFoldEnd "install-yarn"
|
||||
|
||||
|
||||
# Install all npm dependencies according to yarn.lock
|
||||
travisFoldStart "yarn-install"
|
||||
(node tools/npm/check-node-modules --purge && yarn postinstall) || yarn install --frozen-lockfile --non-interactive
|
||||
travisFoldEnd "yarn-install"
|
||||
|
||||
|
||||
|
||||
# Install Chromium
|
||||
if [[ ${TRAVIS} &&
|
||||
${CI_MODE} == "js" ||
|
||||
${CI_MODE} == "e2e" ||
|
||||
${CI_MODE} == "e2e_2"
|
||||
]]; then
|
||||
travisFoldStart "install-chromium"
|
||||
(
|
||||
${thisDir}/install-chromium.sh
|
||||
|
||||
# Start xvfb for local Chrome used for testing
|
||||
if [[ ${TRAVIS} ]]; then
|
||||
travisFoldStart "install-chromium.xvfb-start"
|
||||
sh -e /etc/init.d/xvfb start
|
||||
travisFoldEnd "install-chromium.xvfb-start"
|
||||
fi
|
||||
)
|
||||
travisFoldEnd "install-chromium"
|
||||
fi
|
||||
|
||||
|
||||
# Install Sauce Connect
|
||||
if [[ ${TRAVIS}] && (${CI_MODE} == "saucelabs_required" || ${CI_MODE} == "saucelabs_optional") ]]; then
|
||||
travisFoldStart "install-sauceConnect"
|
||||
|
@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -u -e -o pipefail
|
||||
|
||||
# Setup environment
|
||||
readonly thisDir=$(cd $(dirname $0); pwd)
|
||||
source ${thisDir}/_travis-fold.sh
|
||||
|
||||
travisFoldStart "test.unit.localChrome"
|
||||
$(npm bin)/karma start ./karma-js.conf.js --single-run --browsers=${KARMA_JS_BROWSERS}
|
||||
travisFoldEnd "test.unit.localChrome"
|
Reference in New Issue
Block a user