File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ services:
4141 - LOCAL_PHP_MEMCACHED=${LOCAL_PHP_MEMCACHED-false}
4242 - PHP_FPM_UID=${PHP_FPM_UID-1000}
4343 - PHP_FPM_GID=${PHP_FPM_GID-1000}
44+ - GITHUB_REF=${GITHUB_REF-false}
45+ - GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME-false}
4446
4547 volumes :
4648 - ./tools/local-env/php-config.ini:/usr/local/etc/php/conf.d/php-config.ini
Original file line number Diff line number Diff line change @@ -202,20 +202,20 @@ public function clean_up_global_scope() {
202202 /**
203203 * Allows tests to be skipped on some automated runs.
204204 *
205- * For test runs on GitHub Actions for something other than trunk/master ,
206- * we want to skip tests that only need to run for master .
205+ * For test runs on GitHub Actions for something other than trunk,
206+ * we want to skip tests that only need to run for trunk .
207207 */
208208 public function skipOnAutomatedBranches () {
209209 // https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables
210210 $ github_event_name = getenv ( 'GITHUB_EVENT_NAME ' );
211211 $ github_ref = getenv ( 'GITHUB_REF ' );
212212
213- if ( $ github_event_name && ' false ' !== $ github_event_name ) {
213+ if ( $ github_event_name ) {
214214 // We're on GitHub Actions.
215215 $ skipped = array ( 'pull_request ' , 'pull_request_target ' );
216216
217- if ( in_array ( $ github_event_name , $ skipped , true ) || 'refs/heads/master ' !== $ github_ref ) {
218- $ this ->markTestSkipped ( 'For automated test runs, this test is only run on trunk/master ' );
217+ if ( in_array ( $ github_event_name , $ skipped , true ) || 'refs/heads/trunk ' !== $ github_ref ) {
218+ $ this ->markTestSkipped ( 'For automated test runs, this test is only run on trunk ' );
219219 }
220220 }
221221 }
Original file line number Diff line number Diff line change 88class Tests_Basic extends WP_UnitTestCase {
99
1010 public function test_license () {
11- // This test is designed to only run on trunk/master .
11+ // This test is designed to only run on trunk.
1212 $ this ->skipOnAutomatedBranches ();
1313
1414 $ license = file_get_contents ( ABSPATH . 'license.txt ' );
@@ -18,7 +18,7 @@ public function test_license() {
1818 }
1919
2020 public function test_security_md () {
21- // This test is designed to only run on trunk/master .
21+ // This test is designed to only run on trunk.
2222 $ this ->skipOnAutomatedBranches ();
2323
2424 $ security = file_get_contents ( dirname ( ABSPATH ) . '/SECURITY.md ' );
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class Tests_External_HTTP_Basic extends WP_UnitTestCase {
1010 * @covers ::wp_remote_retrieve_body
1111 */
1212 public function test_readme_php_version () {
13- // This test is designed to only run on trunk/master .
13+ // This test is designed to only run on trunk.
1414 $ this ->skipOnAutomatedBranches ();
1515
1616 $ readme = file_get_contents ( ABSPATH . 'readme.html ' );
@@ -31,7 +31,7 @@ public function test_readme_php_version() {
3131 * @covers ::wp_remote_retrieve_body
3232 */
3333 public function test_readme_mysql_version () {
34- // This test is designed to only run on trunk/master .
34+ // This test is designed to only run on trunk.
3535 $ this ->skipOnAutomatedBranches ();
3636
3737 $ readme = file_get_contents ( ABSPATH . 'readme.html ' );
@@ -63,7 +63,7 @@ public function test_readme_mysql_version() {
6363 * @covers ::wp_remote_retrieve_body
6464 */
6565 public function test_readme_mariadb_version () {
66- // This test is designed to only run on trunk/master .
66+ // This test is designed to only run on trunk.
6767 $ this ->skipOnAutomatedBranches ();
6868
6969 $ readme = file_get_contents ( ABSPATH . 'readme.html ' );
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ public function test_default_themes_have_textdomain() {
213213 * @ticket 48566
214214 */
215215 public function test_year_in_readme () {
216- // This test is designed to only run on trunk/master .
216+ // This test is designed to only run on trunk.
217217 $ this ->skipOnAutomatedBranches ();
218218
219219 foreach ( $ this ->default_themes as $ theme ) {
You can’t perform that action at this time.
0 commit comments