Build/Test Tools: Remove remaining Travis CI references.

* Remove `travis:` tasks in Gruntfile.js.
* Remove status badge in README.md that comes from Travis CI via shields.io.
* Remove Travis CI related skipping in the `WP_UnitTestCase_Base::skipOnAutomatedBranches()` test method and related Docker environment variables.

Props johnbillion, SergeyBiryukov, ocean90.
See #52161.
Fixes #52666.

git-svn-id: https://develop.svn.wordpress.org/trunk@50697 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling 2021-04-10 12:05:50 +00:00
parent b394d5a7cf
commit 87fc38e588
5 changed files with 5 additions and 29 deletions

View File

@ -1639,15 +1639,9 @@ module.exports = function(grunt) {
var done = this.async();
var flags = this.flags;
var args = changedFiles.php;
if ( flags.travisErrors ) {
// We can check the entire codebase for coding standards errors.
args = [ 'lint:errors' ];
} else if ( flags.travisWarnings ) {
// We can check the tests directory for errors and warnings.
args = [ 'lint', 'tests' ];
} else {
args.unshift( 'lint' );
}
args.unshift( 'lint' );
grunt.util.spawn( {
cmd: 'composer',
args: args,
@ -1661,11 +1655,6 @@ module.exports = function(grunt) {
} );
} );
// Travis CI tasks.
grunt.registerTask('travis:js', 'Runs JavaScript Travis CI tasks.', [ 'jshint:corejs', 'qunit:compiled' ]);
grunt.registerTask('travis:phpunit', 'Runs PHPUnit Travis CI tasks.', [ 'build', 'phpunit' ]);
grunt.registerTask('travis:phpcs', 'Runs PHP Coding Standards Travis CI tasks.', [ 'format:php:error', 'lint:php:travisErrors:error', 'lint:php:travisWarnings:error' ]);
// Patch task.
grunt.renameTask('patch_wordpress', 'patch');

View File

@ -1,7 +1,5 @@
# WordPress
[![Build Status](https://img.shields.io/travis/com/WordPress/wordpress-develop/master.svg)](https://travis-ci.com/WordPress/wordpress-develop)
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.
* [Getting Started](#getting-started)

View File

@ -108,8 +108,6 @@ services:
WP_MULTISITE: ${WP_MULTISITE-false}
PHP_FPM_UID: ${PHP_FPM_UID-1000}
PHP_FPM_GID: ${PHP_FPM_GID-1000}
TRAVIS_BRANCH: ${TRAVIS_BRANCH-false}
TRAVIS_PULL_REQUEST: ${TRAVIS_PULL_REQUEST-false}
GITHUB_REF: ${GITHUB_REF-false}
GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME-false}

View File

@ -96,7 +96,7 @@
</properties>
</rule>
<!-- Exclude the build folder in the current directory, as Travis puts the checkout in a build directory. -->
<!-- Exclude the build folder in the current directory. -->
<exclude-pattern type="relative">^build/*</exclude-pattern>
<!-- Directories and third party library exclusions. -->

View File

@ -181,14 +181,10 @@ abstract class WP_UnitTestCase_Base extends PHPUnit\Framework\TestCase {
/**
* Allow tests to be skipped on some automated runs.
*
* For test runs on Travis/GitHub Actions for something other than trunk/master,
* For test runs on GitHub Actions for something other than trunk/master,
* we want to skip tests that only need to run for master.
*/
public function skipOnAutomatedBranches() {
// https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
$travis_branch = getenv( 'TRAVIS_BRANCH' );
$travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' );
// https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables
$github_event_name = getenv( 'GITHUB_EVENT_NAME' );
$github_ref = getenv( 'GITHUB_REF' );
@ -200,11 +196,6 @@ abstract class WP_UnitTestCase_Base extends PHPUnit\Framework\TestCase {
if ( in_array( $github_event_name, $skipped, true ) || 'refs/heads/master' !== $github_ref ) {
$this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' );
}
} elseif ( $travis_branch && 'false' !== $travis_branch ) {
// We're on Travis CI.
if ( 'master' !== $travis_branch || 'false' !== $travis_pull_request ) {
$this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' );
}
}
}