Make WordPress Core


Ignore:
Timestamp:
07/02/2024 07:23:50 PM (9 months ago)
Author:
desrosj
Message:

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

This updates the 5.2 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.2 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.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

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

    r50606 r58625  
    190190
    191191    /**
    192      * Allow tests to be skipped on some automated runs.
    193      *
    194      * For test runs on Travis for something other than trunk/master
    195      * we want to skip tests that only need to run for master.
     192     * Allows tests to be skipped on some automated runs.
     193     *
     194     * For test runs on GitHub Actions for something other than trunk,
     195     * we want to skip tests that only need to run for trunk.
    196196     */
    197197    public function skipOnAutomatedBranches() {
    198         // gentenv can be disabled
    199         if ( ! function_exists( 'getenv' ) ) {
    200             return false;
    201         }
    202 
    203         // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
    204         $travis_branch       = getenv( 'TRAVIS_BRANCH' );
    205         $travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' );
    206 
    207         if ( false !== $travis_pull_request && 'master' !== $travis_branch ) {
    208             $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' );
     198        // https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
     199        $github_event_name = getenv( 'GITHUB_EVENT_NAME' );
     200        $github_ref        = getenv( 'GITHUB_REF' );
     201
     202        if ( $github_event_name ) {
     203            // We're on GitHub Actions.
     204            $skipped = array( 'pull_request', 'pull_request_target' );
     205
     206            if ( in_array( $github_event_name, $skipped, true ) || 'refs/heads/trunk' !== $github_ref ) {
     207                $this->markTestSkipped( 'For automated test runs, this test is only run on trunk' );
     208            }
    209209        }
    210210    }
Note: See TracChangeset for help on using the changeset viewer.