Home page Forum Wiki Mail Jabber Devel NIX-FILES

AltLUG Git

Git-repositories of Altai Linux User Group

Add testswarm integration as grunt task
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 30 Apr 2012 13:36:44 +0000 (15:36 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 30 Apr 2012 13:38:14 +0000 (15:38 +0200)
grunt.js
package.json

index 27ab218..4299191 100644 (file)
--- a/grunt.js
+++ b/grunt.js
@@ -74,7 +74,24 @@ grunt.initConfig({
        }
 });
 
-// Default task.
+grunt.registerTask( "testswarm", function( commit, configFile ) {
+       var testswarm = require( "testswarm" ),
+               config = grunt.file.readJSON( configFile );
+       testswarm({
+               url: "http://swarm.jquery.org/",
+               pollInterval: 10000,
+               done: this.async()
+       }, {
+               authUsername: "qunit",
+               authToken: config.qunit.authToken,
+               jobName: 'QUnit commit #<a href="https://github.com/jquery/qunit/commit/' + commit + '">' + commit + '</a>',
+               runMax: 3,
+               "runNames[]": "QUnit",
+               "runUrls[]": "http://swarm.jquery.org/git/qunit/" + commit + "/test/index.html",
+               "browserSets[]": ["popular"]
+       });
+});
+
 grunt.registerTask('default', 'lint qunit');
 
 };
index 80cef70..01da7ec 100644 (file)
@@ -27,6 +27,7 @@
   ],
   "main": "qunit/qunit.js",
   "devDependencies": {
-    "grunt": "0.3.x"
+    "grunt": "0.3.x",
+    "testswarm": "0.2.0"
   }
 }

Hosting is provided AltSPAHow to use Git
Please direct any questions on jabber alex.wolf@jabber.ru

Valid HTML 4.0 Transitional Valid CSS!

Designer Alexander Wolf