Skip to content

Commit

Permalink
Add Travis support
Browse files Browse the repository at this point in the history
  • Loading branch information
pkozlowski-opensource committed Sep 10, 2012
1 parent f47cde7 commit 1530158
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: node_js
node_js:
- "0.8"

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- npm link

script: grunt
10 changes: 6 additions & 4 deletions grunt.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,15 @@ module.exports = function (grunt) {

grunt.registerTask('test', 'run testacular tests', function () {

var specDone = this.async();
var testacularCmd = process.platform === 'win32' ? 'testacular.cmd' : 'testacular';
var child = grunt.utils.spawn({cmd:testacularCmd, args:['run']}, function (err, result, code) {
var testCmd = process.platform === 'win32' ? 'testacular.cmd' : 'testacular';
var testArgs = process.env.TRAVIS ? ['start', 'test/test-config.js', '--single-run', '--no-auto-watch', '--reporter=dots', '--browsers=Firefox'] : ['run'];

var done = this.async();
var child = grunt.utils.spawn({cmd:testCmd, args:testArgs}, function (err, result, code) {
if (code) {
grunt.fail.fatal("Test failed...", code);
} else {
specDone();
done();
}
});

Expand Down

0 comments on commit 1530158

Please sign in to comment.