Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ env:
- LOGS_DIR=/tmp/angular-build/logs
- SAUCE_USERNAME=angular-ci
- SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987
- BROWSER_STACK_USERNAME=angularteam1
- BROWSER_STACK_ACCESS_KEY=BWCd4SynLzdDcv8xtzsB
- ARCH=linux-x64
- DART_DEV_VERSION=latest
- DART_STABLE_VERSION=latest
Expand All @@ -36,6 +38,7 @@ env:
- MODE=dart DART_CHANNEL=stable DART_VERSION=$DART_STABLE_VERSION
- MODE=dart DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION
- MODE=saucelabs DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION
- MODE=browserstack DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION
- MODE=dart_experimental DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION
- MODE=js DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION
- MODE=router DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION
Expand All @@ -44,6 +47,7 @@ env:
matrix:
allow_failures:
- env: "MODE=saucelabs DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION"
- env: "MODE=browserstack DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION"
- env: "MODE=dart_experimental DART_CHANNEL=dev DART_VERSION=$DART_DEV_VERSION"

addons:
Expand Down
19 changes: 17 additions & 2 deletions sauce.conf.js → browser-providers.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,17 @@ var customLaunchers = {
browserName: 'android',
platform: 'Linux',
version: '5.1'
},

'BS_Chrome': {
base: 'BrowserStack',
browser: 'chrome',
os: 'OS X',
os_version: 'Yosemite'
}
};

var aliases = {
var sauceAliases = {
'ALL': Object.keys(customLaunchers).filter(function(item) {return customLaunchers[item].base == 'SauceLabs';}),
'DESKTOP': ['SL_CHROME', 'SL_FIREFOX', 'SL_IE9', 'SL_IE10', 'SL_IE11', 'SL_EDGE', 'SL_SAFARI7', 'SL_SAFARI8', 'SL_SAFARI9.0'],
'MOBILE': ['SL_ANDROID4.1', 'SL_ANDROID4.2', 'SL_ANDROID4.3', 'SL_ANDROID4.4', 'SL_ANDROID5.1', 'SL_IOS7', 'SL_IOS8', 'SL_IOS9'],
Expand All @@ -142,11 +149,19 @@ var aliases = {
'SL_CHROMEDEV', 'SL_FIREFOXBETA']
};

var browserstackAliases = {
'ALL': Object.keys(customLaunchers).filter(function(item) {return customLaunchers[item].base == 'BrowserStack';}),
'DESKTOP': ['BS_Chrome'],
'CI': ['BS_Chrome'],
};

module.exports = {
customLaunchers: customLaunchers,
aliases: aliases
sauceAliases: sauceAliases,
browserstackAliases: browserstackAliases
}

if (process.env.TRAVIS) {
process.env.SAUCE_ACCESS_KEY = process.env.SAUCE_ACCESS_KEY.split('').reverse().join('');
process.env.BROWSER_STACK_ACCESS_KEY = process.env.BROWSER_STACK_ACCESS_KEY.split('').reverse().join('');
}
25 changes: 19 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var buildRouter = require('./modules/angular1_router/build');
var uglify = require('gulp-uglify');
var shouldLog = require('./tools/build/logging');
var dartSdk = require('./tools/build/dart');
var sauceConf = require('./sauce.conf');
var browserProvidersConf = require('./browser-providers.conf.js');
var os = require('os');

require('./tools/check-environment')({
Expand Down Expand Up @@ -477,17 +477,17 @@ function getBrowsersFromCLI() {
for (var i = 0; i < inputList.length; i++) {
var input = inputList[i];
var karmaChromeLauncher = require('karma-chrome-launcher');
if (sauceConf.customLaunchers.hasOwnProperty(input) || karmaChromeLauncher.hasOwnProperty("launcher:" + input)) {
if (browserProvidersConf.customLaunchers.hasOwnProperty(input) || karmaChromeLauncher.hasOwnProperty("launcher:" + input)) {
// In case of non-sauce browsers, or browsers defined in karma-chrome-launcher (Chrome, ChromeCanary and Dartium):
// overrides everything, ignoring other options
outputList = [input];
isSauce = false;
break;
} else if (sauceConf.customLaunchers.hasOwnProperty("SL_" + input.toUpperCase())) {
} else if (browserProvidersConf.customLaunchers.hasOwnProperty("SL_" + input.toUpperCase())) {
isSauce = true;
outputList.push("SL_" + input.toUpperCase());
} else if (sauceConf.aliases.hasOwnProperty(input.toUpperCase())) {
outputList = outputList.concat(sauceConf.aliases[input]);
} else if (browserProvidersConf.sauceAliases.hasOwnProperty(input.toUpperCase())) {
outputList = outputList.concat(browserProvidersConf.sauceAliases[input]);
isSauce = true;
} else {
throw new Error('ERROR: unknown browser found in getBrowsersFromCLI()');
Expand Down Expand Up @@ -667,12 +667,25 @@ gulp.task('test.unit.js.sauce/ci', function (done) {
browserNoActivityTimeout: 240000,
captureTimeout: 120000,
reporters: ['dots', 'saucelabs'],
browsers: sauceConf.aliases.CI
browsers: browserProvidersConf.sauceAliases.CI
},
function(err) {done(); process.exit(err ? 1 : 0);}
).start();
});

gulp.task('test.unit.js.browserstack/ci', function (done) {
new karma.Server({
configFile: __dirname + '/karma-js.conf.js',
singleRun: true,
browserNoActivityTimeout: 240000,
captureTimeout: 120000,
reporters: ['dots'],
browsers: browserProvidersConf.browserstackAliases.CI
},
function(err) {done(); process.exit(err ? 1 : 0);}
).start();
});

gulp.task('test.unit.dart/ci', function (done) {
var browserConf = getBrowsersFromCLI();
new karma.Server({
Expand Down
4 changes: 2 additions & 2 deletions karma-dart.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var sauceConf = require('./sauce.conf');
var browserProvidersConf = require('./browser-providers.conf.js');

var packageSources = {
// Dependencies installed with `pub install`.
Expand Down Expand Up @@ -67,7 +67,7 @@ module.exports = function(config) {
// Map packages to the correct urls where Karma serves them.
proxies: proxyPaths,

customLaunchers: sauceConf.customLaunchers,
customLaunchers: browserProvidersConf.customLaunchers,
browsers: ['DartiumWithWebPlatform'],

port: 9877,
Expand Down
33 changes: 24 additions & 9 deletions karma-js.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var sauceConf = require('./sauce.conf');
var browserProvidersConf = require('./browser-providers.conf.js');

// Karma configuration
// Generated on Thu Sep 25 2014 11:52:02 GMT-0700 (PDT)
Expand Down Expand Up @@ -33,7 +33,7 @@ module.exports = function(config) {

exclude: ['dist/js/dev/es5/**/e2e_test/**', 'dist/js/dev/es5/angular2/examples/**', 'dist/angular1_router.js'],

customLaunchers: sauceConf.customLaunchers,
customLaunchers: browserProvidersConf.customLaunchers,

sauceLabs: {
testName: 'Angular2',
Expand All @@ -48,18 +48,33 @@ module.exports = function(config) {
}
},

browserStack: {
project: 'Angular2',
startTunnel: false,
retryLimit: 1,
timeout: 600
},

browsers: ['Chrome'],

port: 9876
});

if (process.env.TRAVIS && process.env.MODE === 'saucelabs') {
config.sauceLabs.build = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';
config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
if (process.env.TRAVIS) {
var buildId = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';
if (process.env.MODE === 'saucelabs') {
config.sauceLabs.build = buildId;
config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;

// TODO(mlaval): remove once SauceLabs supports websockets.
// This speeds up the capturing a bit, as browsers don't even try to use websocket.
console.log('>>>> setting socket.io transport to polling <<<<');
config.transports = ['polling'];
}

// TODO(mlaval): remove once SauceLabs supports websockets.
// This speeds up the capturing a bit, as browsers don't even try to use websocket.
console.log('>>>> setting socket.io transport to polling <<<<');
config.transports = ['polling'];
if (process.env.MODE === 'browserstack') {
config.browserStack.build = buildId;
config.browserStack.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
}
}
};
4 changes: 2 additions & 2 deletions modules/angular1_router/karma-router.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var sauceConf = require('../../sauce.conf');
var browserProvidersConf = require('../../browser-providers.conf.js');

// This runs the tests for the router in Angular 1.x

Expand All @@ -20,7 +20,7 @@ module.exports = function (config) {
'test/**/*_spec.js'
],

customLaunchers: sauceConf.customLaunchers,
customLaunchers: browserProvidersConf.customLaunchers,

browsers: ['ChromeCanary']
};
Expand Down
124 changes: 124 additions & 0 deletions npm-shrinkwrap.clean.json
Original file line number Diff line number Diff line change
Expand Up @@ -1997,6 +1997,119 @@
}
}
},
"browserstacktunnel-wrapper": {
"version": "1.4.2",
"dependencies": {
"unzip": {
"version": "0.1.11",
"dependencies": {
"fstream": {
"version": "0.1.31",
"dependencies": {
"graceful-fs": {
"version": "3.0.8"
},
"inherits": {
"version": "2.0.1"
},
"mkdirp": {
"version": "0.5.1",
"dependencies": {
"minimist": {
"version": "0.0.8"
}
}
},
"rimraf": {
"version": "2.4.3",
"dependencies": {
"glob": {
"version": "5.0.15",
"dependencies": {
"inflight": {
"version": "1.0.4",
"dependencies": {
"wrappy": {
"version": "1.0.1"
}
}
},
"once": {
"version": "1.3.2",
"dependencies": {
"wrappy": {
"version": "1.0.1"
}
}
},
"path-is-absolute": {
"version": "1.0.0"
}
}
}
}
}
}
},
"pullstream": {
"version": "0.4.1",
"dependencies": {
"over": {
"version": "0.0.5"
},
"slice-stream": {
"version": "1.0.0"
}
}
},
"binary": {
"version": "0.3.0",
"dependencies": {
"chainsaw": {
"version": "0.1.0",
"dependencies": {
"traverse": {
"version": "0.3.9"
}
}
},
"buffers": {
"version": "0.1.1"
}
}
},
"readable-stream": {
"version": "1.0.33",
"dependencies": {
"core-util-is": {
"version": "1.0.1"
},
"isarray": {
"version": "0.0.1"
},
"string_decoder": {
"version": "0.10.31"
},
"inherits": {
"version": "2.0.1"
}
}
},
"setimmediate": {
"version": "1.0.4"
},
"match-stream": {
"version": "0.0.2",
"dependencies": {
"buffers": {
"version": "0.1.1"
}
}
}
}
}
}
},
"canonical-path": {
"version": "0.0.2"
},
Expand Down Expand Up @@ -9631,6 +9744,17 @@
}
}
},
"karma-browserstack-launcher": {
"version": "0.1.6",
"dependencies": {
"browserstack": {
"version": "1.2.0"
},
"q": {
"version": "1.4.1"
}
}
},
"karma-chrome-launcher": {
"version": "0.2.0",
"dependencies": {
Expand Down
Loading