mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Build: Update testswarm task to node-testswarm 1.x API
This commit is contained in:
parent
6b46fde819
commit
8643ac77fb
37
Gruntfile.js
37
Gruntfile.js
@ -163,7 +163,8 @@ module.exports = function( grunt ) {
|
|||||||
grunt.registerTask( "testswarm", function( commit, configFile ) {
|
grunt.registerTask( "testswarm", function( commit, configFile ) {
|
||||||
var jobName,
|
var jobName,
|
||||||
testswarm = require( "testswarm" ),
|
testswarm = require( "testswarm" ),
|
||||||
testUrls = [],
|
runs = {},
|
||||||
|
done = this.async(),
|
||||||
pull = /PR-(\d+)/.exec( commit ),
|
pull = /PR-(\d+)/.exec( commit ),
|
||||||
config = grunt.file.readJSON( configFile ).jquery,
|
config = grunt.file.readJSON( configFile ).jquery,
|
||||||
tests = grunt.config([ this.name, "tests" ]);
|
tests = grunt.config([ this.name, "tests" ]);
|
||||||
@ -177,23 +178,33 @@ module.exports = function( grunt ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tests.forEach(function( test ) {
|
tests.forEach(function( test ) {
|
||||||
testUrls.push( config.testUrl + commit + "/test/index.html?module=" + test );
|
runs[test] = config.testUrl + commit + "/test/index.html?module=" + test;
|
||||||
});
|
});
|
||||||
|
|
||||||
testswarm({
|
// TODO: create separate job for git/git2 so we can do different browsersets
|
||||||
|
testswarm.createClient( {
|
||||||
url: config.swarmUrl,
|
url: config.swarmUrl,
|
||||||
pollInterval: 10000,
|
pollInterval: 10000,
|
||||||
timeout: 1000 * 60 * 30,
|
timeout: 1000 * 60 * 30
|
||||||
done: this.async()
|
} )
|
||||||
}, {
|
.addReporter( testswarm.reporters.cli )
|
||||||
authUsername: config.authUsername,
|
.auth( {
|
||||||
authToken: config.authToken,
|
id: config.authUsername,
|
||||||
jobName: jobName,
|
token: config.authToken
|
||||||
|
})
|
||||||
|
.addjob(
|
||||||
|
{
|
||||||
|
name: jobName,
|
||||||
|
runs: runs,
|
||||||
runMax: config.runMax,
|
runMax: config.runMax,
|
||||||
"runNames[]": tests,
|
browserSets: "popular-no-old-ie"
|
||||||
"runUrls[]": testUrls,
|
}, function( err, passed ) {
|
||||||
"browserSets[]": "popular-no-old-ie"
|
if ( err ) {
|
||||||
});
|
grunt.log.error( err );
|
||||||
|
}
|
||||||
|
done( passed );
|
||||||
|
}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
grunt.registerTask( "selector", "Build Sizzle-based selector module", function() {
|
grunt.registerTask( "selector", "Build Sizzle-based selector module", function() {
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
"grunt-contrib-uglify": "0.2.0",
|
"grunt-contrib-uglify": "0.2.0",
|
||||||
"grunt": "0.4.1",
|
"grunt": "0.4.1",
|
||||||
"gzip-js": "0.3.1",
|
"gzip-js": "0.3.1",
|
||||||
"testswarm": "0.2.2",
|
"testswarm": "~1.1.0",
|
||||||
"archiver": "~0.4.2"
|
"archiver": "~0.4.2"
|
||||||
},
|
},
|
||||||
"keywords": []
|
"keywords": []
|
||||||
|
Loading…
Reference in New Issue
Block a user