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: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
sudo: false
node_js:
- '0.12'
- '4.1.1'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really want to pin it that much? 0.12 was a range (currently matching 0.12.7).

Related: angular/protractor#2543

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just want to ensure that ci uses the same version as what we use locally. So my preference is to pin it down to an exact version and update that once in a while. (especially since newer node version could update npm and cause conflicts...)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, makes sense, I guess. We can still use a newer version locally but CI might be more stable when no unplanned Node update happens.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup

On Wed, Sep 30, 2015 at 3:18 PM Michał Gołębiowski notifications@github.com
wrote:

In .travis.yml
#4375 (comment):

@@ -1,7 +1,7 @@
language: node_js
sudo: false
node_js:
-- '0.12'
+- '4.1.1'

Hmm, makes sense, I guess. We can still use a newer version locally but CI
might be more stable when no unplanned Node update happens.


Reply to this email directly or view it on GitHub
https://github.com/angular/angular/pull/4375/files#r40859889.


branches:
except:
Expand Down Expand Up @@ -63,7 +63,7 @@ before_install:

install:
# Update npm
- npm install -g npm@2.9.1
- npm install -g npm@2.14.5
- npm --version
# Check the size of caches
- du -sh ./node_modules || true
Expand Down
64 changes: 46 additions & 18 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ var sauceConf = require('./sauce.conf');
var os = require('os');

require('./tools/check-environment')({
requiredNpmVersion: '>=2.9.0',
requiredNodeVersion: '>=0.12.2'
requiredNpmVersion: '>=2.14.5',
requiredNodeVersion: '>=4.1.1'
});

// Make it easy to quiet down portions of the build.
Expand Down Expand Up @@ -567,7 +567,7 @@ gulp.task('test.all.dart', shell.task(['./scripts/ci/test_dart.sh']));
function getBrowsersFromCLI() {
var isSauce = false;
var args = minimist(process.argv.slice(2));
var rawInput = args.browsers?args.browsers:'DartiumWithWebPlatform';
var rawInput = args.browsers ? args.browsers : 'DartiumWithWebPlatform';
var inputList = rawInput.replace(' ', '').split(',');
var outputList = [];
for (var i = 0; i < inputList.length; i++) {
Expand Down Expand Up @@ -610,21 +610,21 @@ gulp.task('test.unit.js', ['build.js.dev'], function (done) {
gulp.task('test.unit.js.sauce', ['build.js.dev'], function (done) {
var browserConf = getBrowsersFromCLI();
if (browserConf.isSauce) {
karma.server.start({
new karma.Server({
configFile: __dirname + '/karma-js.conf.js',
singleRun: true,
browserNoActivityTimeout: 240000,
captureTimeout: 120000,
reporters: ['dots'],
browsers: browserConf.browsersToRun},
function(err) {done(); process.exit(err ? 1 : 0);});
function(err) {done(); process.exit(err ? 1 : 0);}).start();
} else {
throw new Error('ERROR: no Saucelabs browsers provided, add them with the --browsers option');
}
});

gulp.task('!test.unit.js/karma-server', function() {
karma.server.start({configFile: __dirname + '/karma-js.conf.js', reporters: 'dots'});
new karma.Server({configFile: __dirname + '/karma-js.conf.js', reporters: 'dots'}).start();
});


Expand All @@ -647,7 +647,11 @@ gulp.task('test.unit.router', function (done) {
});

gulp.task('!test.unit.router/karma-server', function() {
karma.server.start({configFile: __dirname + '/modules/angular1_router/karma-router.conf.js'});
new karma.Server({
configFile: __dirname + '/modules/angular1_router/karma-router.conf.js',
reporters: 'dots'
}
).start();
});


Expand Down Expand Up @@ -697,33 +701,57 @@ gulp.task('!test.unit.dart/karma-run', function (done) {


gulp.task('!test.unit.dart/karma-server', function() {
karma.server.start({configFile: __dirname + '/karma-dart.conf.js', reporters: 'dots'});
new karma.Server({configFile: __dirname + '/karma-dart.conf.js', reporters: 'dots'}).start();
});


gulp.task('test.unit.router/ci', function (done) {
var browserConf = getBrowsersFromCLI();
karma.server.start({configFile: __dirname + '/modules/angular1_router/karma-router.conf.js',
singleRun: true, reporters: ['dots'], browsers: browserConf.browsersToRun}, done);
new karma.Server({
configFile: __dirname + '/modules/angular1_router/karma-router.conf.js',
singleRun: true,
reporters: ['dots'],
browsers: browserConf.browsersToRun
},
done
).start();
});

gulp.task('test.unit.js/ci', function (done) {
var browserConf = getBrowsersFromCLI();
karma.server.start({configFile: __dirname + '/karma-js.conf.js',
singleRun: true, reporters: ['dots'], browsers: browserConf.browsersToRun}, done);
new karma.Server({
configFile: __dirname + '/karma-js.conf.js',
singleRun: true,
reporters: ['dots'],
browsers: browserConf.browsersToRun
},
done
).start();
});

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

gulp.task('test.unit.dart/ci', function (done) {
var browserConf = getBrowsersFromCLI();
karma.server.start({configFile: __dirname + '/karma-dart.conf.js',
singleRun: true, reporters: ['dots'], browsers: browserConf.browsersToRun}, done);
new karma.Server({
configFile: __dirname + '/karma-dart.conf.js',
singleRun: true,
reporters: ['dots'],
browsers: browserConf.browsersToRun
},
done
).start();
});


Expand Down
2 changes: 1 addition & 1 deletion karma-dart-evalcache.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function createFactory(proxyPaths) {
function dartEvalCacheFactory(emitter, logger, customFileHandlers) {
var filesPromise = new common.PromiseContainer();
emitter.on('file_list_modified', function(files) {
filesPromise.set(files);
filesPromise.set(Promise.resolve(files));
});

var serveFile = common.createServeFile(fs);
Expand Down
5 changes: 3 additions & 2 deletions karma-js.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ module.exports = function(config) {
port: 9876
});

if (process.env.TRAVIS) {
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;

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