Permalink
Browse files

Don't run tests if Saucelabs environment variables aren't available

  • Loading branch information...
1 parent 6c1d9a5 commit 88d1b6b4ce1aefaf01e01ad6819884c6b7eb7d74 @Stuk committed Feb 11, 2014
Showing with 5 additions and 5 deletions.
  1. +5 −5 Gruntfile.js
View
@@ -105,17 +105,17 @@ module.exports = function(grunt) {
}
});
- // Loading dependencies
- // for (var key in grunt.file.readJSON("package.json").devDependencies) {
- // if (key !== "grunt" && key.indexOf("grunt") === 0) grunt.loadNpmTasks(key);
- // }
grunt.loadNpmTasks("grunt-saucelabs");
grunt.loadNpmTasks("grunt-contrib-connect");
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
- grunt.registerTask("test", ["connect", "saucelabs-qunit"]);
+ if (process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY) {
+ grunt.registerTask("test", ["connect", "saucelabs-qunit"]);
+ } else {
+ grunt.registerTask("test", []);
+ }
grunt.registerTask("build", ["browserify", "uglify"]);
grunt.registerTask("default", ["jshint", "build"]);
};

0 comments on commit 88d1b6b

Please sign in to comment.