From 4f93d7a01e7ba04ea7235fec8950202ca4db2deb Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Zaefferer?= Date: Mon, 30 Apr 2012 15:36:44 +0200 Subject: [PATCH 1/1] Add testswarm integration as grunt task --- grunt.js | 19 ++++++++++++++++++- package.json | 3 ++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/grunt.js b/grunt.js index 27ab218..4299191 100644 --- 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 #' + commit + '', + runMax: 3, + "runNames[]": "QUnit", + "runUrls[]": "http://swarm.jquery.org/git/qunit/" + commit + "/test/index.html", + "browserSets[]": ["popular"] + }); +}); + grunt.registerTask('default', 'lint qunit'); }; diff --git a/package.json b/package.json index 80cef70..01da7ec 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ ], "main": "qunit/qunit.js", "devDependencies": { - "grunt": "0.3.x" + "grunt": "0.3.x", + "testswarm": "0.2.0" } } -- 2.11.0