Changeset 49267 for trunk/tests/phpunit/includes/abstract-testcase.php
- Timestamp:
- 10/21/2020 07:55:17 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/includes/abstract-testcase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/abstract-testcase.php
r49264 r49267 194 194 $github_ref = getenv( 'GITHUB_REF' ); 195 195 196 if ( ( ! $travis_branch || ! $travis_pull_request ) && ! $github_event_name ) { 197 return; 198 } 199 200 if ( ( 'master' !== $travis_branch || 'false' !== $travis_pull_request ) && empty( $github_event_name ) ) { 201 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' ); 202 } elseif ( in_array( $github_event_name, array( 'pull_request', 'pull_request_target' ), true ) || 'refs/heads/master' !== $github_ref ) { 203 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' ); 196 if ( 'false' !== $github_event_name ) { 197 // We're on GitHub Actions. 198 $skipped = array( 'pull_request', 'pull_request_target' ); 199 200 if ( in_array( $github_event_name, $skipped, true ) || 'refs/heads/master' !== $github_ref ) { 201 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master - GitHub only' ); 202 } 203 } elseif ( 'false' !== $travis_branch ) { 204 // We're on Travis CI. 205 if ( 'master' !== $travis_branch || 'false' !== $travis_pull_request ) { 206 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master - Travis only' ); 207 } 204 208 } 205 209 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)