Ticket #52666: 52666.diff
File 52666.diff, 3.3 KB (added by , 4 years ago) |
---|
-
Gruntfile.js
1616 1617 var done = this.async(); 1617 1618 var flags = this.flags; 1618 1619 var args = changedFiles.php; 1619 if ( flags.travisErrors ) { 1620 // We can check the entire codebase for coding standards errors. 1621 args = [ 'lint:errors' ]; 1622 } else if ( flags.travisWarnings ) { 1623 // We can check the tests directory for errors and warnings. 1624 args = [ 'lint', 'tests' ]; 1625 } else { 1626 args.unshift( 'lint' ); 1627 } 1620 1621 args.unshift( 'lint' ); 1622 1628 1623 grunt.util.spawn( { 1629 1624 cmd: 'composer', 1630 1625 args: args, … … 1638 1633 } ); 1639 1634 } ); 1640 1635 1641 // Travis CI tasks.1642 grunt.registerTask('travis:js', 'Runs JavaScript Travis CI tasks.', [ 'jshint:corejs', 'qunit:compiled' ]);1643 grunt.registerTask('travis:phpunit', 'Runs PHPUnit Travis CI tasks.', [ 'build', 'phpunit' ]);1644 grunt.registerTask('travis:phpcs', 'Runs PHP Coding Standards Travis CI tasks.', [ 'format:php:error', 'lint:php:travisErrors:error', 'lint:php:travisWarnings:error' ]);1645 1646 1636 // Patch task. 1647 1637 grunt.renameTask('patch_wordpress', 'patch'); 1648 1638 -
README.md
1 1 # WordPress 2 2 3 [![Build Status](https://img.shields.io/travis/com/WordPress/wordpress-develop/master.svg)](https://travis-ci.com/WordPress/wordpress-develop)4 5 3 Welcome to the WordPress development repository! Please check out the [contributor handbook](https://make.wordpress.org/core/handbook/) for information about how to open bug reports, contribute patches, test changes, write documentation, or get involved in any way you can. 6 4 7 5 * [Getting Started](#getting-started) -
tests/phpunit/includes/abstract-testcase.php
181 181 /** 182 182 * Allow tests to be skipped on some automated runs. 183 183 * 184 * For test runs on Travis/GitHub Actions for something other than trunk/master,184 * For test runs on GitHub Actions for something other than trunk/master, 185 185 * we want to skip tests that only need to run for master. 186 186 */ 187 187 public function skipOnAutomatedBranches() { 188 // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables189 $travis_branch = getenv( 'TRAVIS_BRANCH' );190 $travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' );191 192 188 // https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables 193 189 $github_event_name = getenv( 'GITHUB_EVENT_NAME' ); 194 190 $github_ref = getenv( 'GITHUB_REF' ); … … 200 196 if ( in_array( $github_event_name, $skipped, true ) || 'refs/heads/master' !== $github_ref ) { 201 197 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' ); 202 198 } 203 } elseif ( $travis_branch && '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' );207 }208 199 } 209 200 } 210 201