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:
Igor Minar
2019-01-04 11:58:33 -08:00
committed by Andrew Kushnir
parent 0be8487f09
commit 2b001cb2b1
17 changed files with 205 additions and 346 deletions

View File

@ -144,20 +144,19 @@ module.exports = function(config) {
browserNoActivityTimeout: 300000,
});
if (process.env.TRAVIS) {
var buildId =
'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';
if (process.env.CI_MODE.startsWith('saucelabs')) {
config.sauceLabs.build = buildId;
config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
if (process.env.CIRCLECI) {
const tunnelIdentifier = process.env['SAUCE_TUNNEL_IDENTIFIER'];
// Try "websocket" for a faster transmission first. Fallback to "polling" if necessary.
config.transports = ['websocket', 'polling'];
}
// Setup the Saucelabs plugin so that it can launch browsers using the proper tunnel.
config.sauceLabs.build = tunnelIdentifier;
config.sauceLabs.tunnelIdentifier = tunnelIdentifier;
if (process.env.CI_MODE.startsWith('browserstack')) {
config.browserStack.build = buildId;
config.browserStack.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
}
// Setup the Browserstack plugin so that it can launch browsers using the proper tunnel.
// TODO: This is currently not used because BS doesn't run on the CI. Consider removing.
config.browserStack.build = tunnelIdentifier;
config.browserStack.tunnelIdentifier = tunnelIdentifier;
// Try "websocket" for a faster transmission first. Fallback to "polling" if necessary.
config.transports = ['websocket', 'polling'];
}
};