mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Build: Also update the testswarm tasks itself
This commit is contained in:
parent
0b3d689d33
commit
62b30d04b3
@ -4,6 +4,7 @@ module.exports = function( grunt ) {
|
||||
|
||||
var versions = {
|
||||
"git": "git",
|
||||
"1.9": "1.9.0 1.9.1",
|
||||
"1.8": "1.8.0 1.8.1 1.8.2 1.8.3",
|
||||
"1.7": "1.7 1.7.1 1.7.2",
|
||||
"1.6": "1.6 1.6.1 1.6.2 1.6.3 1.6.4"
|
||||
@ -34,29 +35,39 @@ var versions = {
|
||||
"Widget": "widget/widget.html"
|
||||
};
|
||||
|
||||
function submit( commit, tests, configFile, version, done ) {
|
||||
var test,
|
||||
function submit( commit, runs, configFile, extra, done ) {
|
||||
var testName,
|
||||
testswarm = require( "testswarm" ),
|
||||
config = grunt.file.readJSON( configFile ).jqueryui,
|
||||
testBase = config.testUrl + commit + "/tests/unit/",
|
||||
testUrls = [];
|
||||
for ( test in tests ) {
|
||||
testUrls.push( testBase + tests[ test ] );
|
||||
commitUrl = "https://github.com/jquery/jquery-ui/commit/" + commit;
|
||||
|
||||
if ( extra ) {
|
||||
extra = " " + extra;
|
||||
}
|
||||
version = version ? ( version + " " ) : "";
|
||||
testswarm({
|
||||
|
||||
for ( testName in runs ) {
|
||||
runs[ testName ] = config.testUrl + commit + "/tests/unit/" + runs[ testName ];
|
||||
}
|
||||
testswarm.createClient({
|
||||
url: config.swarmUrl,
|
||||
pollInterval: 10000,
|
||||
timeout: 1000 * 60 * 45,
|
||||
done: done
|
||||
}, {
|
||||
authUsername: config.authUsername,
|
||||
authToken: config.authToken,
|
||||
jobName: 'jQuery UI 1-9 ' + version + '#<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit.substr( 0, 10 ) + '</a>',
|
||||
timeout: 1000 * 60 * 45
|
||||
})
|
||||
.addReporter( testswarm.reporters.cli )
|
||||
.auth({
|
||||
id: config.authUsername,
|
||||
token: config.authToken
|
||||
})
|
||||
.addjob({
|
||||
name: "jQuery UI 1-9 #<a href='" + commitUrl + "'>" + commit.substr( 0, 10 ) + "</a>" + extra,
|
||||
runs: runs,
|
||||
runMax: config.runMax,
|
||||
"runNames[]": Object.keys(tests),
|
||||
"runUrls[]": testUrls,
|
||||
"browserSets[]": ["popular"]
|
||||
browserSets: config.browserSets
|
||||
}, function( error, passed ) {
|
||||
if ( error ) {
|
||||
grunt.log.error( error );
|
||||
}
|
||||
done( passed );
|
||||
});
|
||||
}
|
||||
|
||||
@ -76,7 +87,7 @@ grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile, mino
|
||||
allTests[ test + "-" + version ] = tests[ test ] + "?nojshint=true&jquery=" + version;
|
||||
}
|
||||
});
|
||||
submit( commit, allTests, configFile, minor + " core", this.async() );
|
||||
submit( commit, allTests, configFile, "core " + minor, this.async() );
|
||||
});
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user