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
+1 -10
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' );
}
}
}