Make WordPress Core


Ignore:
Timestamp:
07/01/2024 07:17:07 PM (5 months ago)
Author:
desrosj
Message:

Build/Test Tools: Make use of new reusable workflows for 5.4.

This updates the 5.4 branch to utilize the new reusable workflows in trunk introduced in [58165].

This also includes backports for a some additional improvements and bug fixes that are necessary for the local development environment to continue working long term:

  • The image and platform properties for the mysql container have been updated to always prefer amd64 containers (#60822).
  • macos-13 is now pinned for MacOS jobs instead of macos-latest (#61340).
  • Migrating to Docker Compose V2 (#60901).
  • Removing the version property from docker-compose.yml (#59416).
  • Improvements to how artifacts and comments for Playground testing are generated.
  • Removing SVN related commands causing failures (#61216).
  • Updating the actions/github-scripts action to the latest version.
  • Cache the results of PHP_CodeSniffer runs (#49783).
  • Move the Memcached container into the Docker Compose config (#55700).
  • Improvements to the healthcheck command for the mysql container (#58867).
  • Skip some tests when not in the primary branch (#50401).

Merges [49264], [51673], [52179], [53552], [53895], [56464], [57918], [58157], [57124], [57125], [57249] to the 5.4 branch.

Props johnbillion, joemcgill, swissspidy, thelovekesh, narenin, mukesh27, JeffPaul, peterwilsoncc, zieladam, ockham, SergeyBiryukov, jorbin, Clorith, afragen, jrf.
See #49783, #58867, #61340, #60822, #61216, #60901, #61101, #59416, #59805, #61213.

Location:
branches/5.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.4

  • branches/5.4/tests/phpunit/includes/abstract-testcase.php

    r50604 r58611  
    181181
    182182    /**
    183      * Allow tests to be skipped on some automated runs.
    184      *
    185      * For test runs on Travis for something other than trunk/master
    186      * we want to skip tests that only need to run for master.
     183     * Allows tests to be skipped on some automated runs.
     184     *
     185     * For test runs on GitHub Actions for something other than trunk,
     186     * we want to skip tests that only need to run for trunk.
    187187     */
    188188    public function skipOnAutomatedBranches() {
    189         // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
    190         $travis_branch       = getenv( 'TRAVIS_BRANCH' );
    191         $travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' );
    192 
    193         if ( ! $travis_branch || ! $travis_pull_request ) {
    194             return;
    195         }
    196 
    197         if ( 'master' !== $travis_branch || 'false' !== $travis_pull_request ) {
    198             $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' );
     189        // https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
     190        $github_event_name = getenv( 'GITHUB_EVENT_NAME' );
     191        $github_ref        = getenv( 'GITHUB_REF' );
     192
     193        if ( $github_event_name ) {
     194            // We're on GitHub Actions.
     195            $skipped = array( 'pull_request', 'pull_request_target' );
     196
     197            if ( in_array( $github_event_name, $skipped, true ) || 'refs/heads/trunk' !== $github_ref ) {
     198                $this->markTestSkipped( 'For automated test runs, this test is only run on trunk' );
     199            }
    199200        }
    200201    }
Note: See TracChangeset for help on using the changeset viewer.