Changeset 53349 for trunk/tests/phpunit/includes/abstract-testcase.php
- Timestamp:
- 05/04/2022 12:38:18 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/abstract-testcase.php
r51999 r53349 203 203 * Allows tests to be skipped on some automated runs. 204 204 * 205 * For test runs on GitHub Actions for something other than trunk /master,206 * we want to skip tests that only need to run for master.205 * For test runs on GitHub Actions for something other than trunk, 206 * we want to skip tests that only need to run for trunk. 207 207 */ 208 208 public function skipOnAutomatedBranches() { … … 211 211 $github_ref = getenv( 'GITHUB_REF' ); 212 212 213 if ( $github_event_name && 'false' !== $github_event_name) {213 if ( $github_event_name ) { 214 214 // We're on GitHub Actions. 215 215 $skipped = array( 'pull_request', 'pull_request_target' ); 216 216 217 if ( in_array( $github_event_name, $skipped, true ) || 'refs/heads/ master' !== $github_ref ) {218 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk /master' );217 if ( in_array( $github_event_name, $skipped, true ) || 'refs/heads/trunk' !== $github_ref ) { 218 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk' ); 219 219 } 220 220 }
Note: See TracChangeset
for help on using the changeset viewer.