Last active
August 29, 2015 14:01
-
-
Save austenc/fc5c1b46633a601aabae to your computer and use it in GitHub Desktop.
Gruntfile + Vagrant + PHPunit testing using grunt-githooks and grunt-phpunit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
githooks: { | |
all: { | |
'pre-commit': { | |
command: 'vagrant ssh', | |
taskNames: '--command', | |
args: '"cd /vagrant; grunt phpunit"' // add other tasks here | |
} | |
} | |
}, | |
phpunit: { | |
classes: { | |
dir: 'app/tests' | |
}, | |
options: { | |
bin: 'vendor/bin/phpunit', | |
colors: true | |
} | |
} | |
}); | |
// Load tasks | |
grunt.loadNpmTasks('grunt-phpunit'); | |
grunt.loadNpmTasks('grunt-githooks'); | |
// Register tasks | |
grunt.registerTask('default', [ | |
'phpunit' | |
]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment