]> source.dussan.org Git - jquery.git/commitdiff
Grunt: Add testswarm task
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 7 May 2012 10:06:12 +0000 (12:06 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 7 May 2012 10:06:12 +0000 (12:06 +0200)
grunt.js
package.json

index 374640804370aa12e30af55d05c8230c25875fb6..44ecee46f41bb9abbd17dfcba290700ad4fa0e10 100644 (file)
--- a/grunt.js
+++ b/grunt.js
@@ -105,6 +105,28 @@ module.exports = function( grunt ) {
 
        grunt.loadNpmTasks("grunt-compare-size");
 
+       grunt.registerTask( "testswarm", function( commit, configFile ) {
+               var testswarm = require( "testswarm" ),
+                       testUrls = [];
+               var tests = "ajax attributes callbacks core css data deferred dimensions effects event manipulation offset queue selector support traversing".split( " " );
+               tests.forEach(function( test ) {
+                       testUrls.push( "http://swarm.jquery.org/git/jquery/" + commit + "/test/index.html?filter=" + test );
+               });
+               testswarm({
+                       url: "http://swarm.jquery.org/",
+                       pollInterval: 10000,
+                       done: this.async()
+               }, {
+                       authUsername: "jqueryui",
+                       authToken: grunt.file.readJSON( configFile ).jquery.authToken,
+                       jobName: 'jQuery commit #<a href="https://github.com/jquery/jquery/commit/' + commit + '">' + commit + '</a>',
+                       runMax: 4,
+                       "runNames[]": tests,
+                       "runUrls[]": testUrls,
+                       "browserSets[]": ["popular"]
+               });
+       });
+
        // Build src/selector.js
        grunt.registerMultiTask( "selector", "Build src/selector.js", function() {
 
index 271b59264c98a365a5da5d006243a95aa155e13b..6dffb6ac870d26617f1437f6b1b544791dd28690 100644 (file)
@@ -27,7 +27,8 @@
   "dependencies": {},
   "devDependencies": {
     "grunt-compare-size": ">=0.1.0",
-    "grunt": ">=0.3.9"
+    "grunt": ">=0.3.9",
+    "testswarm": "0.2.2"
   },
   "keywords": []
 }