Build/Test Tools: Pass GitHub Actions environment variables to the Docker container.

This ensures that `WP_UnitTestCase::skipOnAutomatedBranches()` has access to the `GITHUB_REF` and `GITHUB_EVENT_NAME` variables, so that some tests can be skipped when appropriate.

Additionally, account for renaming the `master` branch to `trunk` in November 2021.

Follow-up to [40241], [46999], [49264], [49267], [51868].

Fixes #55668.

git-svn-id: https://develop.svn.wordpress.org/trunk@53349 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2022-05-04 00:38:18 +00:00
parent 546114eca8
commit 04e9728701
5 changed files with 13 additions and 11 deletions

View File

@@ -8,7 +8,7 @@
class Tests_Basic extends WP_UnitTestCase {
public function test_license() {
// This test is designed to only run on trunk/master.
// This test is designed to only run on trunk.
$this->skipOnAutomatedBranches();
$license = file_get_contents( ABSPATH . 'license.txt' );
@@ -18,7 +18,7 @@ class Tests_Basic extends WP_UnitTestCase {
}
public function test_security_md() {
// This test is designed to only run on trunk/master.
// This test is designed to only run on trunk.
$this->skipOnAutomatedBranches();
$security = file_get_contents( dirname( ABSPATH ) . '/SECURITY.md' );