Build/Test Tools: Avoid running full PHPUnit test suite for every PHP file change.
Use `grunt watch --phpunit --group={testgroup}` to start `grunt watch` with a specific test group so that PHP file changes trigger a limited number of tests. Props jeremyfelt, birgire for testing. Fixes #44240. git-svn-id: https://develop.svn.wordpress.org/trunk@43335 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a14e4f1c86
commit
8d9cd406fb
11
Gruntfile.js
11
Gruntfile.js
@ -1111,10 +1111,6 @@ module.exports = function(grunt) {
|
||||
'!tests/qunit/editor/**'
|
||||
],
|
||||
tasks: ['qunit']
|
||||
},
|
||||
phpunit: {
|
||||
files: [ '**/*.php' ],
|
||||
tasks: [ 'phpunit:default' ]
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -1160,6 +1156,13 @@ module.exports = function(grunt) {
|
||||
grunt.task.run( 'build' );
|
||||
}
|
||||
|
||||
if ( 'watch:phpunit' === grunt.cli.tasks[ 0 ] || 'undefined' !== typeof grunt.option( 'phpunit' ) ) {
|
||||
grunt.config.data._watch.phpunit = {
|
||||
files: [ '**/*.php' ],
|
||||
tasks: [ 'phpunit:default' ]
|
||||
};
|
||||
}
|
||||
|
||||
grunt.task.run( '_' + this.nameArgs );
|
||||
} );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user