WordPress.org

Make WordPress Core

Changeset 43335


Ignore:
Timestamp:
06/08/2018 04:40:18 AM (3 years ago)
Author:
jeremyfelt
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Gruntfile.js

    r43329 r43335  
    11121112                ],
    11131113                tasks: ['qunit']
    1114             },
    1115             phpunit: {
    1116                 files: [ '**/*.php' ],
    1117                 tasks: [ 'phpunit:default' ]
    11181114            }
    11191115        }
     
    11591155        if ( ! this.args.length || this.args.indexOf( 'webpack' ) > -1 ) {
    11601156            grunt.task.run( 'build' );
     1157        }
     1158
     1159        if ( 'watch:phpunit' === grunt.cli.tasks[ 0 ] || 'undefined' !== typeof grunt.option( 'phpunit' ) ) {
     1160            grunt.config.data._watch.phpunit = {
     1161                files: [ '**/*.php' ],
     1162                tasks: [ 'phpunit:default' ]
     1163            };
    11611164        }
    11621165
Note: See TracChangeset for help on using the changeset viewer.