<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[58165] trunk/.github/workflows: Build/Test Tools: Convert GitHub action workflows into reusable ones.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/58165">58165</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/58165","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>desrosj</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2024-05-17 17:41:40 +0000 (Fri, 17 May 2024)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Build/Test Tools: Convert GitHub action workflows into reusable ones.

With a few exceptions, GitHub Actions workflows run using the version of the workflow file present in the commit SHA or Git ref for the triggering event. This is useful for maintaining different versions of a workflow file.

In the case of WordPress where there are currently 25+ branches that could potentially receive a security fix, it creates a huge maintenance burden. When 3rd party actions are updated or features are deprecated on GitHub Actions, the required changes need to be backported to all of those branches. This takes considerable time and effort.

This change converts Core's workflow files to reusable ones. This allows the same workflow to be used for all (or most) branches, allowing the described maintenance updates to be made once in `trunk`.

To keep track of which files are reusable vs. those that are responsible for holding the strategy matrix for that branch, reusable workflows are now prefixed with `reusable-`.

Props johnbillion, swissspidy, jorbin, desrosj.
Fixes <a href="https://core.trac.wordpress.org/ticket/61213">#61213</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkgithubworkflowscodingstandardsyml">trunk/.github/workflows/coding-standards.yml</a></li>
<li><a href="#trunkgithubworkflowsendtoendtestsyml">trunk/.github/workflows/end-to-end-tests.yml</a></li>
<li><a href="#trunkgithubworkflowsjavascripttestsyml">trunk/.github/workflows/javascript-tests.yml</a></li>
<li><a href="#trunkgithubworkflowsperformanceyml">trunk/.github/workflows/performance.yml</a></li>
<li><a href="#trunkgithubworkflowsphpcompatibilityyml">trunk/.github/workflows/php-compatibility.yml</a></li>
<li><a href="#trunkgithubworkflowsphpunittestsyml">trunk/.github/workflows/phpunit-tests.yml</a></li>
<li><a href="#trunkgithubworkflowstestbuildprocessesyml">trunk/.github/workflows/test-build-processes.yml</a></li>
<li><a href="#trunkgithubworkflowsupgradetestingyml">trunk/.github/workflows/upgrade-testing.yml</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkgithubworkflowsreusablecodingstandardsjavascriptyml">trunk/.github/workflows/reusable-coding-standards-javascript.yml</a></li>
<li><a href="#trunkgithubworkflowsreusablecodingstandardsphpyml">trunk/.github/workflows/reusable-coding-standards-php.yml</a></li>
<li><a href="#trunkgithubworkflowsreusableendtoendtestsyml">trunk/.github/workflows/reusable-end-to-end-tests.yml</a></li>
<li><a href="#trunkgithubworkflowsreusablejavascripttestsyml">trunk/.github/workflows/reusable-javascript-tests.yml</a></li>
<li><a href="#trunkgithubworkflowsreusableperformanceyml">trunk/.github/workflows/reusable-performance.yml</a></li>
<li><a href="#trunkgithubworkflowsreusablephpcompatibilityyml">trunk/.github/workflows/reusable-php-compatibility.yml</a></li>
<li><a href="#trunkgithubworkflowsreusablephpunittestsyml">trunk/.github/workflows/reusable-phpunit-tests.yml</a></li>
<li><a href="#trunkgithubworkflowsreusabletestcorebuildprocessyml">trunk/.github/workflows/reusable-test-core-build-process.yml</a></li>
<li><a href="#trunkgithubworkflowsreusabletestgutenbergbuildprocessyml">trunk/.github/workflows/reusable-test-gutenberg-build-process.yml</a></li>
<li><a href="#trunkgithubworkflowsreusableupgradetestingyml">trunk/.github/workflows/reusable-upgrade-testing.yml</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkgithubworkflowscallabletestcorebuildprocessyml">trunk/.github/workflows/callable-test-core-build-process.yml</a></li>
<li><a href="#trunkgithubworkflowscallabletestgutenbergbuildprocessyml">trunk/.github/workflows/callable-test-gutenberg-build-process.yml</a></li>
<li><a href="#trunkgithubworkflowsphpunittestsrunyml">trunk/.github/workflows/phpunit-tests-run.yml</a></li>
<li><a href="#trunkgithubworkflowsupgradetestingrunyml">trunk/.github/workflows/upgrade-testing-run.yml</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkgithubworkflowscallabletestcorebuildprocessyml"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: trunk/.github/workflows/callable-test-core-build-process.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/callable-test-core-build-process.yml      2024-05-17 13:11:27 UTC (rev 58164)
+++ trunk/.github/workflows/callable-test-core-build-process.yml        2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,91 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-##
-# A callable workflow that tests the WordPress Core build process.
-##
-name: Test the WordPress Build Process
-
-on:
-  workflow_call:
-    inputs:
-      os:
-        description: 'Operating system to run tests on'
-        required: false
-        type: 'string'
-        default: 'ubuntu-latest'
-      directory:
-        description: 'Directory to run WordPress from. Valid values are `src` or `build`'
-        required: false
-        type: 'string'
-        default: 'src'
-
-env:
-  PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
-
-jobs:
-  # Verifies that installing npm dependencies and building WordPress works as expected.
-  #
-  # Performs the following steps:
-  # - Checks out the repository.
-  # - Sets up Node.js.
-  # - Logs debug information about the GitHub Action runner.
-  # - Installs npm dependencies.
-  # - Builds WordPress to run from the desired location (src or build).
-  # - Ensures version-controlled files are not modified or deleted.
-  # - Creates a ZIP of the built WordPress files (when building to the build directory).
-  # - Cleans up after building WordPress.
-  # - Ensures version-controlled files are not modified or deleted.
-  # - Uploads the ZIP as a GitHub Actions artifact (when building to the build directory).
-  build-process-tests:
-    name: Core running from ${{ inputs.directory }} / ${{ inputs.os == 'macos-latest' && 'MacOS' || inputs.os == 'windows-latest' && 'Windows' || 'Linux' }}
-    runs-on: ${{ inputs.os }}
-    timeout-minutes: 20
-
-    steps:
-      - name: Checkout repository
-        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
-        with:
-          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
-
-      - name: Set up Node.js
-        uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
-        with:
-          node-version-file: '.nvmrc'
-          cache: npm
-
-      - name: Log debug information
-        run: |
-          npm --version
-          node --version
-          curl --version
-          git --version
-
-      - name: Install npm Dependencies
-        run: npm ci
-
-      - name: Run Emoji precommit task
-        run: npm run grunt precommit:emoji
-        env:
-          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
-      - name: Build WordPress to run from ${{ inputs.directory }}
-        run: npm run build${{ inputs.directory == 'src' && ':dev' || '' }}
-
-      - name: Ensure version-controlled files are not modified or deleted during building
-        run: git diff --exit-code
-
-      - name: Create ZIP of built files
-        if: ${{ inputs.directory == 'build' && 'ubuntu-latest' == inputs.os }}
-        run: zip -r wordpress.zip build/.
-
-      - name: Clean after building to run from ${{ inputs.directory }}
-        run: npm run grunt clean${{ inputs.directory == 'src' && ' -- --dev' || '' }}
-
-      - name: Ensure version-controlled files are not modified or deleted during cleaning
-        run: git diff --exit-code
-
-      - name: Upload ZIP as a GitHub Actions artifact
-        uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
-        if: ${{ inputs.directory == 'build' && 'ubuntu-latest' == inputs.os }}
-        with:
-          name: wordpress-build-${{ github.event_name == 'pull_request' && github.event.number || github.sha }}
-          path: wordpress.zip
-          if-no-files-found: error
</del></span></pre></div>
<a id="trunkgithubworkflowscallabletestgutenbergbuildprocessyml"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: trunk/.github/workflows/callable-test-gutenberg-build-process.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/callable-test-gutenberg-build-process.yml 2024-05-17 13:11:27 UTC (rev 58164)
+++ trunk/.github/workflows/callable-test-gutenberg-build-process.yml   2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,92 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-##
-# A callable workflow that tests the Gutenberg plugin build process when run within a wordpress-develop checkout.
-##
-name: Test the Gutenberg plugin Build Process
-
-on:
-  workflow_call:
-    inputs:
-      os:
-        description: 'Operating system to run tests on'
-        required: false
-        type: 'string'
-        default: 'ubuntu-latest'
-      directory:
-        description: 'Directory to run WordPress from. Valid values are `src` or `build`'
-        required: false
-        type: 'string'
-        default: 'src'
-
-env:
-  GUTENBERG_DIRECTORY: ${{ inputs.directory == 'build' && 'build' || 'src' }}/wp-content/plugins/gutenberg
-  PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
-  NODE_OPTIONS: '--max-old-space-size=8192'
-
-jobs:
-  # Verifies that installing npm dependencies and building the Gutenberg plugin works as expected.
-  #
-  # Performs the following steps:
-  # - Checks out the repository.
-  # - Checks out the Gutenberg plugin into the plugins directory.
-  # - Sets up Node.js.
-  # - Logs debug information about the GitHub Action runner.
-  # - Installs Core npm dependencies.
-  # - Installs Gutenberg npm dependencies.
-  # - Runs the Gutenberg build process.
-  # - Builds WordPress to run from the relevant location (src or build).
-  # - Builds Gutenberg.
-  # - Ensures version-controlled files are not modified or deleted.
-  build-process-tests:
-    name: Gutenberg running from ${{ inputs.directory }} / ${{ inputs.os == 'macos-latest' && 'MacOS' || inputs.os == 'windows-latest' && 'Windows' || 'Linux' }}
-    runs-on: ${{ inputs.os }}
-    timeout-minutes: 30
-
-    steps:
-      - name: Checkout repository
-        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
-        with:
-          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
-
-      - name: Checkout Gutenberg plugin
-        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
-        with:
-          repository: 'WordPress/gutenberg'
-          path: ${{ env.GUTENBERG_DIRECTORY }}
-          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
-
-      - name: Set up Node.js
-        uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
-        with:
-          node-version-file: '.nvmrc'
-          cache: npm
-          cache-dependency-path: |
-            package-lock.json
-            ${{ env.GUTENBERG_DIRECTORY }}/package-lock.json
-
-      - name: Log debug information
-        run: |
-          npm --version
-          node --version
-          curl --version
-          git --version
-
-      - name: Install Core Dependencies
-        run: npm ci
-
-      - name: Install Gutenberg Dependencies
-        run: npm ci
-        working-directory: ${{ env.GUTENBERG_DIRECTORY }}
-
-      - name: Build Gutenberg
-        run: npm run build
-        working-directory: ${{ env.GUTENBERG_DIRECTORY }}
-
-      - name: Build WordPress to run from ${{ inputs.directory }}
-        run: npm run build${{ inputs.directory == 'src' && ':dev' || '' }}
-
-      - name: Run Gutenberg build script after building Core to run from ${{ inputs.directory }}
-        run: npm run build
-        working-directory: ${{ env.GUTENBERG_DIRECTORY }}
-
-      - name: Ensure version-controlled files are not modified or deleted during building
-        run: git diff --exit-code
</del></span></pre></div>
<a id="trunkgithubworkflowscodingstandardsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/.github/workflows/coding-standards.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/coding-standards.yml      2024-05-17 13:11:27 UTC (rev 58164)
+++ trunk/.github/workflows/coding-standards.yml        2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -45,133 +45,22 @@
</span><span class="cx" style="display: block; padding: 0 10px"> permissions: {}
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> jobs:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-  # Runs PHP coding standards checks.
-  #
-  # Violations are reported inline with annotations.
-  #
-  # Performs the following steps:
-  # - Checks out the repository.
-  # - Sets up PHP.
-  # - Configures caching for PHPCS scans.
-  # - Installs Composer dependencies.
-  # - Make Composer packages available globally.
-  # - Runs PHPCS on the full codebase with warnings suppressed.
-  # - Generate a report for displaying issues as pull request annotations.
-  # - Runs PHPCS on the `tests` directory without warnings suppressed.
-  # - Generate a report for displaying `test` directory issues as pull request annotations.
-  # - Ensures version-controlled files are not modified or deleted.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # Runs the PHP coding standards checks.
</ins><span class="cx" style="display: block; padding: 0 10px">   phpcs:
</span><span class="cx" style="display: block; padding: 0 10px">     name: PHP coding standards
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    runs-on: ubuntu-latest
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     permissions:
</span><span class="cx" style="display: block; padding: 0 10px">       contents: read
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    timeout-minutes: 20
</del><span class="cx" style="display: block; padding: 0 10px">     if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    steps:
-      - name: Checkout repository
-        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
-        with:
-          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
-
-      - name: Set up PHP
-        uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0
-        with:
-          php-version: 'latest'
-          coverage: none
-          tools: cs2pr
-
-      # This date is used to ensure that the PHPCS cache is cleared at least once every week.
-      # http://man7.org/linux/man-pages/man1/date.1.html
-      - name: "Get last Monday's date"
-        id: get-date
-        run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
-
-      - name: Cache PHPCS scan cache
-        uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
-        with:
-          path: |
-            .cache/phpcs-src.json
-            .cache/phpcs-tests.json
-          key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}
-
-      # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
-      # passing a custom cache suffix ensures that the cache is flushed at least once per week.
-      - name: Install Composer dependencies
-        uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0
-        with:
-          custom-cache-suffix: ${{ steps.get-date.outputs.date }}
-
-      - name: Make Composer packages available globally
-        run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
-
-      - name: Run PHPCS on all Core files
-        id: phpcs-core
-        run: phpcs -n --report-full --cache=./.cache/phpcs-src.json --report-checkstyle=./.cache/phpcs-report.xml
-
-      - name: Show PHPCS results in PR
-        if: ${{ always() && steps.phpcs-core.outcome == 'failure' }}
-        run: cs2pr ./.cache/phpcs-report.xml
-
-      - name: Check test suite files for warnings
-        id: phpcs-tests
-        run: phpcs tests --report-full --cache=./.cache/phpcs-tests.json --report-checkstyle=./.cache/phpcs-tests-report.xml
-
-      - name: Show test suite scan results in PR
-        if: ${{ always() && steps.phpcs-tests.outcome == 'failure' }}
-        run: cs2pr ./.cache/phpcs-tests-report.xml
-
-      - name: Ensure version-controlled files are not modified during the tests
-        run: git diff --exit-code
-
</del><span class="cx" style="display: block; padding: 0 10px">   # Runs the JavaScript coding standards checks.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-  #
-  # JSHint violations are not currently reported inline with annotations.
-  #
-  # Performs the following steps:
-  # - Checks out the repository.
-  # - Sets up Node.js.
-  # - Logs debug information about the GitHub Action runner.
-  # - Installs npm dependencies.
-  # - Run the WordPress JSHint checks.
-  # - Ensures version-controlled files are not modified or deleted.
</del><span class="cx" style="display: block; padding: 0 10px">   jshint:
</span><span class="cx" style="display: block; padding: 0 10px">     name: JavaScript coding standards
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    runs-on: ubuntu-latest
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     permissions:
</span><span class="cx" style="display: block; padding: 0 10px">       contents: read
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    timeout-minutes: 20
</del><span class="cx" style="display: block; padding: 0 10px">     if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    env:
-      PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
</del><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    steps:
-      - name: Checkout repository
-        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
-        with:
-          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
-
-      - name: Set up Node.js
-        uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
-        with:
-          node-version-file: '.nvmrc'
-          cache: npm
-
-      - name: Log debug information
-        run: |
-          npm --version
-          node --version
-          git --version
-
-      - name: Install npm Dependencies
-        run: npm ci
-
-      - name: Run JSHint
-        run: npm run grunt jshint
-
-      - name: Ensure version-controlled files are not modified or deleted
-        run: git diff --exit-code
-
</del><span class="cx" style="display: block; padding: 0 10px">   slack-notifications:
</span><span class="cx" style="display: block; padding: 0 10px">     name: Slack Notifications
</span><span class="cx" style="display: block; padding: 0 10px">     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
</span></span></pre></div>
<a id="trunkgithubworkflowsendtoendtestsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/.github/workflows/end-to-end-tests.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/end-to-end-tests.yml      2024-05-17 13:11:27 UTC (rev 58164)
+++ trunk/.github/workflows/end-to-end-tests.yml        2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -36,106 +36,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> jobs:
</span><span class="cx" style="display: block; padding: 0 10px">   # Runs the end-to-end test suite.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-  #
-  # Performs the following steps:
-  # - Sets environment variables.
-  # - Checks out the repository.
-  # - Sets up Node.js.
-  # - Logs debug information about the GitHub Action runner.
-  # - Installs npm dependencies.
-  # - Install Playwright browsers.
-  # - Builds WordPress to run from the `build` directory.
-  # - Starts the WordPress Docker container.
-  # - Logs the running Docker containers.
-  # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container).
-  # - Install WordPress within the Docker container.
-  # - Install Gutenberg.
-  # - Run the E2E tests.
-  # - Ensures version-controlled files are not modified or deleted.
</del><span class="cx" style="display: block; padding: 0 10px">   e2e-tests:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    name: E2E Tests with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }}
-    runs-on: ubuntu-latest
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    name: Test with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }}
+    uses: WordPress/wordpress-develop/.github/workflows/reusable-end-to-end-tests.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     permissions:
</span><span class="cx" style="display: block; padding: 0 10px">       contents: read
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    timeout-minutes: 20
</del><span class="cx" style="display: block; padding: 0 10px">     if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
</span><span class="cx" style="display: block; padding: 0 10px">     strategy:
</span><span class="cx" style="display: block; padding: 0 10px">       fail-fast: false
</span><span class="cx" style="display: block; padding: 0 10px">       matrix:
</span><span class="cx" style="display: block; padding: 0 10px">         LOCAL_SCRIPT_DEBUG: [ true, false ]
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    with:
+      LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }}
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    steps:
-      - name: Configure environment variables
-        run: |
-          echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
-          echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
-
-      - name: Checkout repository
-        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
-        with:
-          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
-
-      - name: Set up Node.js
-        uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
-        with:
-          node-version-file: '.nvmrc'
-          cache: npm
-
-      - name: Log debug information
-        run: |
-          npm --version
-          node --version
-          curl --version
-          git --version
-          locale -a
-
-      - name: Install npm Dependencies
-        run: npm ci
-
-      - name: Install Playwright browsers
-        run: npx playwright install --with-deps
-
-      - name: Build WordPress
-        run: npm run build
-
-      - name: Start Docker environment
-        run: |
-          npm run env:start
-
-      - name: Log running Docker containers
-        run: docker ps -a
-
-      - name: Docker debug information
-        run: |
-          docker -v
-          docker compose run --rm mysql mysql --version
-          docker compose run --rm php php --version
-          docker compose run --rm php php -m
-          docker compose run --rm php php -i
-          docker compose run --rm php locale -a
-
-      - name: Install WordPress
-        env:
-          LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }}
-        run: npm run env:install
-
-      - name: Install Gutenberg
-        run: npm run env:cli -- plugin install gutenberg --path=/var/www/${{ env.LOCAL_DIR }}
-
-      - name: Run E2E tests
-        run: npm run test:e2e
-
-      - name: Archive debug artifacts (screenshots, HTML snapshots)
-        uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
-        if: always()
-        with:
-            name: failures-artifacts${{ matrix.LOCAL_SCRIPT_DEBUG && '-SCRIPT_DEBUG' || '' }}-${{ github.run_id }}
-            path: artifacts
-            if-no-files-found: ignore
-
-      - name: Ensure version-controlled files are not modified or deleted
-        run: git diff --exit-code
-
</del><span class="cx" style="display: block; padding: 0 10px">   slack-notifications:
</span><span class="cx" style="display: block; padding: 0 10px">     name: Slack Notifications
</span><span class="cx" style="display: block; padding: 0 10px">     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
</span></span></pre></div>
<a id="trunkgithubworkflowsjavascripttestsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/.github/workflows/javascript-tests.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/javascript-tests.yml      2024-05-17 13:11:27 UTC (rev 58164)
+++ trunk/.github/workflows/javascript-tests.yml        2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -43,50 +43,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> permissions: {}
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> jobs:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-  # Runs the QUnit tests for WordPress.
-  #
-  # Performs the following steps:
-  # - Checks out the repository.
-  # - Sets up Node.js.
-  # - Logs debug information about the GitHub Action runner.
-  # - Installs npm dependencies.
-  # - Run the WordPress QUnit tests.
-  # - Ensures version-controlled files are not modified or deleted.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # Runs the WordPress Core JavaScript tests.
</ins><span class="cx" style="display: block; padding: 0 10px">   test-js:
</span><span class="cx" style="display: block; padding: 0 10px">     name: QUnit Tests
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    runs-on: ubuntu-latest
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    uses: WordPress/wordpress-develop/.github/workflows/reusable-javascript-tests.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     permissions:
</span><span class="cx" style="display: block; padding: 0 10px">       contents: read
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    timeout-minutes: 20
</del><span class="cx" style="display: block; padding: 0 10px">     if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    steps:
-      - name: Checkout repository
-        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
-        with:
-          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
-
-      - name: Set up Node.js
-        uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
-        with:
-          node-version-file: '.nvmrc'
-          cache: npm
-
-      - name: Log debug information
-        run: |
-          npm --version
-          node --version
-          git --version
-
-      - name: Install npm Dependencies
-        run: npm ci
-
-      - name: Run QUnit tests
-        run: npm run grunt qunit:compiled
-
-      - name: Ensure version-controlled files are not modified or deleted
-        run: git diff --exit-code
-
</del><span class="cx" style="display: block; padding: 0 10px">   slack-notifications:
</span><span class="cx" style="display: block; padding: 0 10px">     name: Slack Notifications
</span><span class="cx" style="display: block; padding: 0 10px">     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
</span></span></pre></div>
<a id="trunkgithubworkflowsperformanceyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/.github/workflows/performance.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/performance.yml   2024-05-17 13:11:27 UTC (rev 58164)
+++ trunk/.github/workflows/performance.yml     2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -29,73 +29,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # Any needed permissions should be configured at the job level.
</span><span class="cx" style="display: block; padding: 0 10px"> permissions: {}
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-env:
-  PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
-
-  # Performance testing should be performed in an environment reflecting a standard production environment.
-  LOCAL_WP_DEBUG: false
-  LOCAL_SCRIPT_DEBUG: false
-  LOCAL_SAVEQUERIES: false
-  LOCAL_WP_DEVELOPMENT_MODE: "''"
-
-  # This workflow takes two sets of measurements â€” one for the current commit,
-  # and another against a consistent version that is used as a baseline measurement.
-  # This is done to isolate variance in measurements caused by the GitHub runners
-  # from differences caused by code changes between commits. The BASE_TAG value here
-  # represents the version being used for baseline measurements. It should only be
-  # changed if we want to normalize results against a different baseline.
-  BASE_TAG: '6.1.1'
-  LOCAL_DIR: build
-  TARGET_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || '' }}
-  TARGET_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
-
</del><span class="cx" style="display: block; padding: 0 10px"> jobs:
</span><span class="cx" style="display: block; padding: 0 10px">   # Runs the performance test suite.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-  #
-  # Performs the following steps:
-  # - Configure environment variables.
-  # - Checkout repository.
-  # - Set up Node.js.
-  # - Log debug information.
-  # - Install npm dependencies.
-  # - Install Playwright browsers.
-  # - Build WordPress.
-  # - Start Docker environment.
-  # - Log running Docker containers.
-  # - Docker debug information.
-  # - Install WordPress.
-  # - Install WordPress Importer plugin.
-  # - Import mock data.
-  # - Deactivate WordPress Importer plugin.
-  # - Update permalink structure.
-  # - Install additional languages.
-  # - Disable external HTTP requests.
-  # - Disable cron.
-  # - List defined constants.
-  # - Install MU plugin.
-  # - Run performance tests (current commit).
-  # - Download previous build artifact (target branch or previous commit).
-  # - Download artifact.
-  # - Unzip the build.
-  # - Run any database upgrades.
-  # - Flush cache.
-  # - Delete expired transients.
-  # - Run performance tests (previous/target commit).
-  # - Set the environment to the baseline version.
-  # - Run any database upgrades.
-  # - Flush cache.
-  # - Delete expired transients.
-  # - Run baseline performance tests.
-  # - Archive artifacts.
-  # - Compare results.
-  # - Add workflow summary.
-  # - Set the base sha.
-  # - Set commit details.
-  # - Publish performance results.
-  # - Ensure version-controlled files are not modified or deleted.
</del><span class="cx" style="display: block; padding: 0 10px">   performance:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    name: Run performance tests ${{ matrix.memcached && '(with memcached)' || '' }}
-    runs-on: ubuntu-latest
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    name: Performance tests ${{ matrix.memcached && '(with memcached)' || '' }}
+    uses: WordPress/wordpress-develop/.github/workflows/reusable-performance.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     permissions:
</span><span class="cx" style="display: block; padding: 0 10px">       contents: read
</span><span class="cx" style="display: block; padding: 0 10px">     if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) && ! contains( github.event.before, '00000000' ) }}
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -103,231 +41,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">       fail-fast: false
</span><span class="cx" style="display: block; padding: 0 10px">       matrix:
</span><span class="cx" style="display: block; padding: 0 10px">         memcached: [ true, false ]
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    env:
-      LOCAL_PHP_MEMCACHED: ${{ matrix.memcached }}
-    steps:
-      - name: Configure environment variables
-        run: |
-          echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
-          echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    with:
+      memcached: ${{ matrix.memcached }}
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-      - name: Checkout repository
-        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
-        with:
-          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
-
-      - name: Set up Node.js
-        uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
-        with:
-          node-version-file: '.nvmrc'
-          cache: npm
-
-      - name: Log debug information
-        run: |
-          npm --version
-          node --version
-          curl --version
-          git --version
-          locale -a
-
-      - name: Install npm dependencies
-        run: npm ci
-
-      - name: Install Playwright browsers
-        run: npx playwright install --with-deps chromium
-
-      - name: Build WordPress
-        run: npm run build
-
-      - name: Start Docker environment
-        run: npm run env:start
-
-      - name: Install object cache drop-in
-        if: ${{ matrix.memcached }}
-        run: cp src/wp-content/object-cache.php build/wp-content/object-cache.php
-
-      - name: Log running Docker containers
-        run: docker ps -a
-
-      - name: Docker debug information
-        run: |
-          docker -v
-          docker compose run --rm mysql mysql --version
-          docker compose run --rm php php --version
-          docker compose run --rm php php -m
-          docker compose run --rm php php -i
-          docker compose run --rm php locale -a
-
-      - name: Install WordPress
-        run: npm run env:install
-
-      - name: Install WordPress Importer plugin
-        run: npm run env:cli -- plugin install wordpress-importer --activate --path=/var/www/${{ env.LOCAL_DIR }}
-
-      - name: Import mock data
-        run: |
-          curl -O https://raw.githubusercontent.com/WordPress/theme-test-data/b9752e0533a5acbb876951a8cbb5bcc69a56474c/themeunittestdata.wordpress.xml
-          npm run env:cli -- import themeunittestdata.wordpress.xml --authors=create --path=/var/www/${{ env.LOCAL_DIR }}
-          rm themeunittestdata.wordpress.xml
-
-      - name: Deactivate WordPress Importer plugin
-        run: npm run env:cli -- plugin deactivate wordpress-importer --path=/var/www/${{ env.LOCAL_DIR }}
-
-      - name: Update permalink structure
-        run: npm run env:cli -- rewrite structure '/%year%/%monthnum%/%postname%/' --path=/var/www/${{ env.LOCAL_DIR }}
-
-      - name: Install additional languages
-        run: |
-          npm run env:cli -- language core install de_DE --path=/var/www/${{ env.LOCAL_DIR }}
-          npm run env:cli -- language plugin install de_DE --all --path=/var/www/${{ env.LOCAL_DIR }}
-          npm run env:cli -- language theme install de_DE --all --path=/var/www/${{ env.LOCAL_DIR }}
-
-      # Prevent background update checks from impacting test stability.
-      - name: Disable external HTTP requests
-        run: npm run env:cli -- config set WP_HTTP_BLOCK_EXTERNAL true --raw --type=constant --path=/var/www/${{ env.LOCAL_DIR }}
-
-      # Prevent background tasks from impacting test stability.
-      - name: Disable cron
-        run: npm run env:cli -- config set DISABLE_WP_CRON true --raw --type=constant --path=/var/www/${{ env.LOCAL_DIR }}
-
-      - name: List defined constants
-        run: npm run env:cli -- config list --path=/var/www/${{ env.LOCAL_DIR }}
-
-      - name: Install MU plugin
-        run: |
-          mkdir ./${{ env.LOCAL_DIR }}/wp-content/mu-plugins
-          cp ./tests/performance/wp-content/mu-plugins/server-timing.php ./${{ env.LOCAL_DIR }}/wp-content/mu-plugins/server-timing.php
-
-      - name: Run performance tests (current commit)
-        run: npm run test:performance
-
-      - name: Download previous build artifact (target branch or previous commit)
-        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
-        id: get-previous-build
-        with:
-          script: |
-            const artifacts = await github.rest.actions.listArtifactsForRepo({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              name: 'wordpress-build-' + process.env.TARGET_SHA,
-            });
-
-            const matchArtifact = artifacts.data.artifacts[0];
-
-            if ( ! matchArtifact ) {
-              core.setFailed( 'No artifact found!' );
-              return false;
-            }
-
-            const download = await github.rest.actions.downloadArtifact( {
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              artifact_id: matchArtifact.id,
-              archive_format: 'zip',
-            } );
-
-            const fs = require( 'fs' );
-            fs.writeFileSync( '${{ github.workspace }}/before.zip', Buffer.from( download.data ) )
-
-            return true;
-
-      - name: Unzip the build
-        if: ${{ steps.get-previous-build.outputs.result }}
-        run: |
-          unzip ${{ github.workspace }}/before.zip
-          unzip -o ${{ github.workspace }}/wordpress.zip
-
-      - name: Run any database upgrades
-        if: ${{ steps.get-previous-build.outputs.result }}
-        run: npm run env:cli -- core update-db --path=/var/www/${{ env.LOCAL_DIR }}
-
-      - name: Flush cache
-        if: ${{ steps.get-previous-build.outputs.result }}
-        run: npm run env:cli -- cache flush --path=/var/www/${{ env.LOCAL_DIR }}
-
-      - name: Delete expired transients
-        if: ${{ steps.get-previous-build.outputs.result }}
-        run: npm run env:cli -- transient delete --expired --path=/var/www/${{ env.LOCAL_DIR }}
-
-      - name: Run target performance tests (previous/target commit)
-        if: ${{ steps.get-previous-build.outputs.result }}
-        env:
-          TEST_RESULTS_PREFIX: before
-        run: npm run test:performance
-
-      - name: Set the environment to the baseline version
-        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }}
-        run: |
-          npm run env:cli -- core update --version=${{ env.BASE_TAG }} --force --path=/var/www/${{ env.LOCAL_DIR }}
-          npm run env:cli -- core version --path=/var/www/${{ env.LOCAL_DIR }}
-
-      - name: Run any database upgrades
-        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }}
-        run: npm run env:cli -- core update-db --path=/var/www/${{ env.LOCAL_DIR }}
-
-      - name: Flush cache
-        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }}
-        run: npm run env:cli -- cache flush --path=/var/www/${{ env.LOCAL_DIR }}
-
-      - name: Delete expired transients
-        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }}
-        run: npm run env:cli -- transient delete --expired --path=/var/www/${{ env.LOCAL_DIR }}
-
-      - name: Run baseline performance tests
-        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }}
-        env:
-          TEST_RESULTS_PREFIX: base
-        run: npm run test:performance
-
-      - name: Archive artifacts
-        uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
-        if: always()
-        with:
-          name: performance-artifacts${{ matrix.memcached && '-memcached' || '' }}-${{ github.run_id }}
-          path: artifacts
-          if-no-files-found: ignore
-
-      - name: Compare results
-        run: node ./tests/performance/compare-results.js ${{ runner.temp }}/summary.md
-
-      - name: Add workflow summary
-        run: cat ${{ runner.temp }}/summary.md >> $GITHUB_STEP_SUMMARY
-
-      - name: Set the base sha
-        # Only needed when publishing results.
-        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! matrix.memcached }}
-        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
-        id: base-sha
-        with:
-            github-token: ${{ secrets.GITHUB_TOKEN }}
-            script: |
-                const baseRef = await github.rest.git.getRef({ owner: context.repo.owner, repo: context.repo.repo, ref: 'tags/${{ env.BASE_TAG }}' });
-                return baseRef.data.object.sha;
-
-      - name: Set commit details
-        # Only needed when publishing results.
-        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! matrix.memcached }}
-        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
-        id: commit-timestamp
-        with:
-            github-token: ${{ secrets.GITHUB_TOKEN }}
-            script: |
-                const commit_details = await github.rest.git.getCommit({ owner: context.repo.owner, repo: context.repo.repo, commit_sha: context.sha });
-                return parseInt((new Date( commit_details.data.author.date ).getTime() / 1000).toFixed(0))
-
-      - name: Publish performance results
-        # Only publish results on pushes to trunk.
-        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! matrix.memcached }}
-        env:
-            BASE_SHA: ${{ steps.base-sha.outputs.result }}
-            COMMITTED_AT: ${{ steps.commit-timestamp.outputs.result }}
-            CODEVITALS_PROJECT_TOKEN: ${{ secrets.CODEVITALS_PROJECT_TOKEN }}
-            HOST_NAME: "www.codevitals.run"
-        run: node ./tests/performance/log-results.js $CODEVITALS_PROJECT_TOKEN trunk $GITHUB_SHA $BASE_SHA $COMMITTED_AT $HOST_NAME
-
-      - name: Ensure version-controlled files are not modified or deleted
-        run: git diff --exit-code
-
</del><span class="cx" style="display: block; padding: 0 10px">   slack-notifications:
</span><span class="cx" style="display: block; padding: 0 10px">     name: Slack Notifications
</span><span class="cx" style="display: block; padding: 0 10px">     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
</span></span></pre></div>
<a id="trunkgithubworkflowsphpcompatibilityyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/.github/workflows/php-compatibility.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/php-compatibility.yml     2024-05-17 13:11:27 UTC (rev 58164)
+++ trunk/.github/workflows/php-compatibility.yml       2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,79 +40,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> permissions: {}
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> jobs:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px">   # Runs PHP compatibility testing.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-  #
-  # Violations are reported inline with annotations.
-  #
-  # Performs the following steps:
-  # - Checks out the repository.
-  # - Sets up PHP.
-  # - Logs debug information.
-  # - Configures caching for PHP compatibility scans.
-  # - Installs Composer dependencies.
-  # - Make Composer packages available globally.
-  # - Runs the PHP compatibility tests.
-  # - Generate a report for displaying issues as pull request annotations.
-  # - Ensures version-controlled files are not modified or deleted.
</del><span class="cx" style="display: block; padding: 0 10px">   php-compatibility:
</span><span class="cx" style="display: block; padding: 0 10px">     name: Check PHP compatibility
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    runs-on: ubuntu-latest
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    uses: WordPress/wordpress-develop/.github/workflows/reusable-php-compatibility.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     permissions:
</span><span class="cx" style="display: block; padding: 0 10px">       contents: read
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    timeout-minutes: 20
</del><span class="cx" style="display: block; padding: 0 10px">     if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    steps:
-      - name: Checkout repository
-        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
-        with:
-          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
-
-      - name: Set up PHP
-        uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0
-        with:
-          php-version: '7.4'
-          coverage: none
-          tools: cs2pr
-
-      - name: Log debug information
-        run: |
-          composer --version
-
-      # This date is used to ensure that the PHP compatibility cache is cleared at least once every week.
-      # http://man7.org/linux/man-pages/man1/date.1.html
-      - name: "Get last Monday's date"
-        id: get-date
-        run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
-
-      - name: Cache PHP compatibility scan cache
-        uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
-        with:
-          path: .cache/phpcompat.json
-          key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }}
-
-      # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
-      # passing a custom cache suffix ensures that the cache is flushed at least once per week.
-      - name: Install Composer dependencies
-        uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0
-        with:
-          custom-cache-suffix: ${{ steps.get-date.outputs.date }}
-
-      - name: Make Composer packages available globally
-        run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
-
-      - name: Run PHP compatibility tests
-        id: phpcs
-        run: phpcs --standard=phpcompat.xml.dist --report-full --report-checkstyle=./.cache/phpcs-compat-report.xml
-
-      - name: Show PHPCompatibility results in PR
-        if: ${{ always() && steps.phpcs.outcome == 'failure' }}
-        run: cs2pr ./.cache/phpcs-compat-report.xml
-
-      - name: Ensure version-controlled files are not modified or deleted
-        run: git diff --exit-code
-
</del><span class="cx" style="display: block; padding: 0 10px">   slack-notifications:
</span><span class="cx" style="display: block; padding: 0 10px">     name: Slack Notifications
</span><span class="cx" style="display: block; padding: 0 10px">     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
</span></span></pre></div>
<a id="trunkgithubworkflowsphpunittestsrunyml"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: trunk/.github/workflows/phpunit-tests-run.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/phpunit-tests-run.yml     2024-05-17 13:11:27 UTC (rev 58164)
+++ trunk/.github/workflows/phpunit-tests-run.yml       2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,192 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-##
-# A callable workflow that runs the PHPUnit test suite with the specified configuration.
-##
-name: Run PHPUnit tests
-
-on:
-  workflow_call:
-    inputs:
-      os:
-        description: 'Operating system to run tests on'
-        required: false
-        type: 'string'
-        default: 'ubuntu-latest'
-      php:
-        description: 'The version of PHP to use, in the format of X.Y'
-        required: true
-        type: 'string'
-      db-type:
-        description: 'Database type. Valid types are mysql and mariadb'
-        required: false
-        type: 'string'
-        default: 'mysql'
-      db-version:
-        description: 'Database version'
-        required: false
-        type: 'string'
-        default: '8.0'
-      multisite:
-        description: 'Whether to run tests as multisite'
-        required: false
-        type: 'boolean'
-        default: false
-      memcached:
-        description: 'Whether to test with memcached enabled'
-        required: false
-        type: 'boolean'
-        default: false
-      phpunit-config:
-        description: 'The PHPUnit configuration file to use'
-        required: false
-        type: 'string'
-        default: 'phpunit.xml.dist'
-      tests-domain:
-        description: 'The domain to use for the tests'
-        required: false
-        type: 'string'
-        default: 'example.org'
-      report:
-        description: 'Whether to report results to WordPress.org Hosting Tests'
-        required: false
-        type: 'boolean'
-        default: false
-env:
-  LOCAL_PHP: ${{ inputs.php }}-fpm
-  LOCAL_DB_TYPE: ${{ inputs.db-type }}
-  LOCAL_DB_VERSION: ${{ inputs.db-version }}
-  LOCAL_PHP_MEMCACHED: ${{ inputs.memcached }}
-  LOCAL_WP_TESTS_DOMAIN: ${{ inputs.tests-domain }}
-  PHPUNIT_CONFIG: ${{ inputs.phpunit-config }}
-  PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
-
-jobs:
-  # Runs the PHPUnit tests for WordPress.
-  #
-  # Performs the following steps:
-  # - Sets environment variables.
-  # - Checks out the repository.
-  # - Sets up Node.js.
-  # - Sets up PHP.
-  # - Installs Composer dependencies.
-  # - Installs npm dependencies
-  # - Logs general debug information about the runner.
-  # - Logs Docker debug information (about the Docker installation within the runner).
-  # - Starts the WordPress Docker container.
-  # - Logs the running Docker containers.
-  # - Logs debug information about what's installed within the WordPress Docker containers.
-  # - Install WordPress within the Docker container.
-  # - Run the PHPUnit tests.
-  # - Ensures version-controlled files are not modified or deleted.
-  # - Checks out the WordPress Test reporter repository.
-  # - Submit the test results to the WordPress.org host test results.
-  phpunit-tests:
-    name: PHP ${{ inputs.php }} / ${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }}
-    runs-on: ${{ inputs.os }}
-    timeout-minutes: 20
-
-    steps:
-      - name: Configure environment variables
-        run: |
-          echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
-          echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
-
-      - name: Checkout repository
-        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
-        with:
-          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
-
-      - name: Set up Node.js
-        uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
-        with:
-          node-version-file: '.nvmrc'
-          cache: npm
-
-      ##
-      # This allows Composer dependencies to be installed using a single step.
-      #
-      # Since the tests are currently run within the Docker containers where the PHP version varies,
-      # the same PHP version needs to be configured for the action runner machine so that the correct
-      # dependency versions are installed and cached.
-      ##
-      - name: Set up PHP
-        uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0
-        with:
-          php-version: '${{ inputs.php }}'
-          coverage: none
-
-      # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
-      # passing a custom cache suffix ensures that the cache is flushed at least once per week.
-      - name: Install Composer dependencies
-        uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0
-        with:
-          custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F")
-
-      - name: Install npm dependencies
-        run: npm ci
-
-      - name: General debug information
-        run: |
-          npm --version
-          node --version
-          curl --version
-          git --version
-          composer --version
-          locale -a
-
-      - name: Docker debug information
-        run: |
-          docker -v
-
-      - name: Start Docker environment
-        run: |
-          npm run env:start
-
-      - name: Log running Docker containers
-        run: docker ps -a
-
-      - name: WordPress Docker container debug information
-        run: |
-          docker compose run --rm mysql ${{ env.LOCAL_DB_TYPE }} --version
-          docker compose run --rm php php --version
-          docker compose run --rm php php -m
-          docker compose run --rm php php -i
-          docker compose run --rm php locale -a
-
-      - name: Install WordPress
-        run: npm run env:install
-
-      - name: Run PHPUnit tests
-        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }}
-
-      - name: Run AJAX tests
-        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax
-
-      - name: Run ms-files tests as a multisite install
-        if: ${{ inputs.multisite }}
-        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ms-files
-
-      - name: Run external HTTP tests
-        if: ${{ ! inputs.multisite }}
-        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group external-http
-
-      # __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist.
-      - name: Run (Xdebug) tests
-        if: ${{ inputs.php != '8.3' }}
-        run: LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__
-
-      - name: Ensure version-controlled files are not modified or deleted
-        run: git diff --exit-code
-
-      - name: Checkout the WordPress Test Reporter
-        if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && inputs.report }}
-        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
-        with:
-          repository: 'WordPress/phpunit-test-runner'
-          path: 'test-runner'
-          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
-
-      - name: Submit test results to the WordPress.org host test results
-        if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && inputs.report }}
-        env:
-          WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}"
-        run: docker compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php
</del></span></pre></div>
<a id="trunkgithubworkflowsphpunittestsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/.github/workflows/phpunit-tests.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/phpunit-tests.yml 2024-05-17 13:11:27 UTC (rev 58164)
+++ trunk/.github/workflows/phpunit-tests.yml   2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -36,7 +36,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">   #
</span><span class="cx" style="display: block; padding: 0 10px">   test-with-mysql:
</span><span class="cx" style="display: block; padding: 0 10px">     name: PHP ${{ matrix.php }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    uses: WordPress/wordpress-develop/.github/workflows/phpunit-tests-run.yml@trunk
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     permissions:
</span><span class="cx" style="display: block; padding: 0 10px">       contents: read
</span><span class="cx" style="display: block; padding: 0 10px">     secrets: inherit
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -108,7 +108,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">   #
</span><span class="cx" style="display: block; padding: 0 10px">   test-with-mariadb:
</span><span class="cx" style="display: block; padding: 0 10px">     name: PHP ${{ matrix.php }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    uses: WordPress/wordpress-develop/.github/workflows/phpunit-tests-run.yml@trunk
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     permissions:
</span><span class="cx" style="display: block; padding: 0 10px">       contents: read
</span><span class="cx" style="display: block; padding: 0 10px">     secrets: inherit
</span></span></pre></div>
<a id="trunkgithubworkflowsreusablecodingstandardsjavascriptyml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/.github/workflows/reusable-coding-standards-javascript.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/reusable-coding-standards-javascript.yml                          (rev 0)
+++ trunk/.github/workflows/reusable-coding-standards-javascript.yml    2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,56 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+##
+# A reusable workflow that checks the JavaScript coding standards.
+##
+name: JavaScript coding standards
+
+on:
+  workflow_call:
+
+env:
+  PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
+
+jobs:
+  # Runs the JavaScript coding standards checks.
+  #
+  # JSHint violations are not currently reported inline with annotations.
+  #
+  # Performs the following steps:
+  # - Checks out the repository.
+  # - Sets up Node.js.
+  # - Logs debug information about the GitHub Action runner.
+  # - Installs npm dependencies.
+  # - Run the WordPress JSHint checks.
+  # - Ensures version-controlled files are not modified or deleted.
+  jshint:
+    name: Run coding standards checks
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+    timeout-minutes: 20
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+        with:
+          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
+
+      - name: Set up Node.js
+        uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
+        with:
+          node-version-file: '.nvmrc'
+          cache: npm
+
+      - name: Log debug information
+        run: |
+          npm --version
+          node --version
+          git --version
+
+      - name: Install npm Dependencies
+        run: npm ci
+
+      - name: Run JSHint
+        run: npm run grunt jshint
+
+      - name: Ensure version-controlled files are not modified or deleted
+        run: git diff --exit-code
</ins></span></pre></div>
<a id="trunkgithubworkflowsreusablecodingstandardsphpyml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/.github/workflows/reusable-coding-standards-php.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/reusable-coding-standards-php.yml                         (rev 0)
+++ trunk/.github/workflows/reusable-coding-standards-php.yml   2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,92 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+##
+# A reusable workflow that checks the PHP coding standards.
+##
+name: PHP coding standards
+
+on:
+  workflow_call:
+    inputs:
+      php-version:
+        description: 'The PHP version to use.'
+        required: false
+        type: 'string'
+        default: 'latest'
+
+jobs:
+  # Runs the PHP coding standards checks.
+  #
+  # Violations are reported inline with annotations.
+  #
+  # Performs the following steps:
+  # - Checks out the repository.
+  # - Sets up PHP.
+  # - Configures caching for PHPCS scans.
+  # - Installs Composer dependencies.
+  # - Make Composer packages available globally.
+  # - Runs PHPCS on the full codebase (warnings excluded).
+  # - Generate a report for displaying issues as pull request annotations.
+  # - Runs PHPCS on the `tests` directory without (warnings included).
+  # - Generate a report for displaying `test` directory issues as pull request annotations.
+  # - Ensures version-controlled files are not modified or deleted.
+  phpcs:
+    name: Run coding standards checks
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+    timeout-minutes: 20
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+        with:
+          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
+
+      - name: Set up PHP
+        uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0
+        with:
+          php-version: ${{ inputs.php-version }}
+          coverage: none
+          tools: cs2pr
+
+      # This date is used to ensure that the PHPCS cache is cleared at least once every week.
+      # http://man7.org/linux/man-pages/man1/date.1.html
+      - name: "Get last Monday's date"
+        id: get-date
+        run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
+
+      - name: Cache PHPCS scan cache
+        uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
+        with:
+          path: |
+            .cache/phpcs-src.json
+            .cache/phpcs-tests.json
+          key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-php-${{ inputs.php-version }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}
+
+      # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
+      # passing a custom cache suffix ensures that the cache is flushed at least once per week.
+      - name: Install Composer dependencies
+        uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0
+        with:
+          custom-cache-suffix: ${{ steps.get-date.outputs.date }}
+
+      - name: Make Composer packages available globally
+        run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
+
+      - name: Run PHPCS on all Core files
+        id: phpcs-core
+        run: phpcs -n --report-full --cache=./.cache/phpcs-src.json --report-checkstyle=./.cache/phpcs-report.xml
+
+      - name: Show PHPCS results in PR
+        if: ${{ always() && steps.phpcs-core.outcome == 'failure' }}
+        run: cs2pr ./.cache/phpcs-report.xml
+
+      - name: Check test suite files for warnings
+        id: phpcs-tests
+        run: phpcs tests --report-full --cache=./.cache/phpcs-tests.json --report-checkstyle=./.cache/phpcs-tests-report.xml
+
+      - name: Show test suite scan results in PR
+        if: ${{ always() && steps.phpcs-tests.outcome == 'failure' }}
+        run: cs2pr ./.cache/phpcs-tests-report.xml
+
+      - name: Ensure version-controlled files are not modified during the tests
+        run: git diff --exit-code
</ins></span></pre></div>
<a id="trunkgithubworkflowsreusableendtoendtestsyml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/.github/workflows/reusable-end-to-end-tests.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/reusable-end-to-end-tests.yml                             (rev 0)
+++ trunk/.github/workflows/reusable-end-to-end-tests.yml       2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,123 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+##
+# A reusable workflow that runs end-to-end tests.
+#
+# Branches 6.3 and earlier used Puppeteer instead of Playwright.
+# Use https://github.com/WordPress/wordpress-develop/tree/6.3/.github/workflows/reusable-end-to-end-tests.yml instead.
+##
+name: End-to-end Tests
+
+on:
+  workflow_call:
+    inputs:
+      LOCAL_SCRIPT_DEBUG:
+        description: 'Whether to enable script debugging.'
+        required: false
+        type: 'boolean'
+        default: false
+      install-gutenberg:
+        description: 'Whether to install the Gutenberg plugin.'
+        required: false
+        type: 'boolean'
+        default: true
+
+env:
+  LOCAL_DIR: build
+
+jobs:
+  # Runs the end-to-end test suite.
+  #
+  # Performs the following steps:
+  # - Sets environment variables.
+  # - Checks out the repository.
+  # - Sets up Node.js.
+  # - Logs debug information about the GitHub Action runner.
+  # - Installs npm dependencies.
+  # - Install Playwright browsers.
+  # - Builds WordPress to run from the `build` directory.
+  # - Starts the WordPress Docker container.
+  # - Logs the running Docker containers.
+  # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container).
+  # - Install WordPress within the Docker container.
+  # - Install Gutenberg.
+  # - Run the E2E tests.
+  # - Uploads screenshots and HTML snapshots as an artifact.
+  # - Ensures version-controlled files are not modified or deleted.
+  e2e-tests:
+    name: Run E2E tests
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+    timeout-minutes: 20
+
+    steps:
+      - name: Configure environment variables
+        run: |
+          echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
+          echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
+
+      - name: Checkout repository
+        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+        with:
+          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
+
+      - name: Set up Node.js
+        uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
+        with:
+          node-version-file: '.nvmrc'
+          cache: npm
+
+      - name: Log debug information
+        run: |
+          npm --version
+          node --version
+          curl --version
+          git --version
+          locale -a
+
+      - name: Install npm Dependencies
+        run: npm ci
+
+      - name: Install Playwright browsers
+        run: npx playwright install --with-deps
+
+      - name: Build WordPress
+        run: npm run build
+
+      - name: Start Docker environment
+        run: |
+          npm run env:start
+
+      - name: Log running Docker containers
+        run: docker ps -a
+
+      - name: Docker debug information
+        run: |
+          docker -v
+          docker compose run --rm mysql mysql --version
+          docker compose run --rm php php --version
+          docker compose run --rm php php -m
+          docker compose run --rm php php -i
+          docker compose run --rm php locale -a
+
+      - name: Install WordPress
+        env:
+          LOCAL_SCRIPT_DEBUG: ${{ inputs.LOCAL_SCRIPT_DEBUG }}
+        run: npm run env:install
+
+      - name: Install Gutenberg
+        if: ${{ inputs.install-gutenberg }}
+        run: npm run env:cli -- plugin install gutenberg --path=/var/www/${{ env.LOCAL_DIR }}
+
+      - name: Run E2E tests
+        run: npm run test:e2e
+
+      - name: Archive debug artifacts (screenshots, HTML snapshots)
+        uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
+        if: always()
+        with:
+          name: failures-artifacts${{ inputs.LOCAL_SCRIPT_DEBUG && '-SCRIPT_DEBUG' || '' }}-${{ github.run_id }}
+          path: artifacts
+          if-no-files-found: ignore
+
+      - name: Ensure version-controlled files are not modified or deleted
+        run: git diff --exit-code
</ins></span></pre></div>
<a id="trunkgithubworkflowsreusablejavascripttestsyml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/.github/workflows/reusable-javascript-tests.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/reusable-javascript-tests.yml                             (rev 0)
+++ trunk/.github/workflows/reusable-javascript-tests.yml       2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,51 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+##
+# A reusable workflow that runs JavaScript tests.
+##
+name: JavaScript tests
+
+on:
+  workflow_call:
+
+jobs:
+  # Runs the QUnit test suite.
+  #
+  # Performs the following steps:
+  # - Checks out the repository.
+  # - Sets up Node.js.
+  # - Logs debug information about the GitHub Action runner.
+  # - Installs npm dependencies.
+  # - Run the WordPress QUnit tests.
+  # - Ensures version-controlled files are not modified or deleted.
+  test-js:
+    name: Run QUnit tests
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+    timeout-minutes: 20
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+        with:
+          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
+
+      - name: Set up Node.js
+        uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
+        with:
+          node-version-file: '.nvmrc'
+          cache: npm
+
+      - name: Log debug information
+        run: |
+          npm --version
+          node --version
+          git --version
+
+      - name: Install npm Dependencies
+        run: npm ci
+
+      - name: Run QUnit tests
+        run: npm run grunt qunit:compiled
+
+      - name: Ensure version-controlled files are not modified or deleted
+        run: git diff --exit-code
</ins></span></pre></div>
<a id="trunkgithubworkflowsreusableperformanceyml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/.github/workflows/reusable-performance.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/reusable-performance.yml                          (rev 0)
+++ trunk/.github/workflows/reusable-performance.yml    2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,317 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+##
+# A reusable workflow that runs the performance test suite.
+##
+name: Performance Tests
+
+on:
+  workflow_call:
+    inputs:
+      LOCAL_DIR:
+        description: 'Where to run WordPress from.'
+        required: false
+        type: 'string'
+        default: 'build'
+      BASE_TAG:
+        description: 'The version being used for baseline measurements.'
+        required: false
+        type: 'string'
+        default: '6.1.1'
+      memcached:
+        description: 'Whether to enable memcached.'
+        required: false
+        type: 'boolean'
+        default: false
+
+env:
+  PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
+
+  # Performance testing should be performed in an environment reflecting a standard production environment.
+  LOCAL_WP_DEBUG: false
+  LOCAL_SCRIPT_DEBUG: false
+  LOCAL_SAVEQUERIES: false
+  LOCAL_WP_DEVELOPMENT_MODE: "''"
+
+  # This workflow takes two sets of measurements â€” one for the current commit,
+  # and another against a consistent version that is used as a baseline measurement.
+  # This is done to isolate variance in measurements caused by the GitHub runners
+  # from differences caused by code changes between commits. The BASE_TAG value here
+  # represents the version being used for baseline measurements. It should only be
+  # changed if we want to normalize results against a different baseline.
+  BASE_TAG: ${{ inputs.BASE_TAG }}
+  LOCAL_DIR: ${{ inputs.LOCAL_DIR }}
+  TARGET_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || '' }}
+  TARGET_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
+
+  LOCAL_PHP_MEMCACHED: ${{ inputs.memcached }}
+
+jobs:
+  # Performs the following steps:
+  # - Configure environment variables.
+  # - Checkout repository.
+  # - Set up Node.js.
+  # - Log debug information.
+  # - Install npm dependencies.
+  # - Install Playwright browsers.
+  # - Build WordPress.
+  # - Start Docker environment.
+  # - Log running Docker containers.
+  # - Docker debug information.
+  # - Install WordPress.
+  # - Install WordPress Importer plugin.
+  # - Import mock data.
+  # - Deactivate WordPress Importer plugin.
+  # - Update permalink structure.
+  # - Install additional languages.
+  # - Disable external HTTP requests.
+  # - Disable cron.
+  # - List defined constants.
+  # - Install MU plugin.
+  # - Run performance tests (current commit).
+  # - Download previous build artifact (target branch or previous commit).
+  # - Download artifact.
+  # - Unzip the build.
+  # - Run any database upgrades.
+  # - Flush cache.
+  # - Delete expired transients.
+  # - Run performance tests (previous/target commit).
+  # - Set the environment to the baseline version.
+  # - Run any database upgrades.
+  # - Flush cache.
+  # - Delete expired transients.
+  # - Run baseline performance tests.
+  # - Archive artifacts.
+  # - Compare results.
+  # - Add workflow summary.
+  # - Set the base sha.
+  # - Set commit details.
+  # - Publish performance results.
+  # - Ensure version-controlled files are not modified or deleted.
+  performance:
+    name: Run tests
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+    if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) && ! contains( github.event.before, '00000000' ) }}
+
+    steps:
+      - name: Configure environment variables
+        run: |
+          echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
+          echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
+
+      - name: Checkout repository
+        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+        with:
+          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
+
+      - name: Set up Node.js
+        uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
+        with:
+          node-version-file: '.nvmrc'
+          cache: npm
+
+      - name: Log debug information
+        run: |
+          npm --version
+          node --version
+          curl --version
+          git --version
+          locale -a
+
+      - name: Install npm dependencies
+        run: npm ci
+
+      - name: Install Playwright browsers
+        run: npx playwright install --with-deps chromium
+
+      - name: Build WordPress
+        run: npm run build
+
+      - name: Start Docker environment
+        run: npm run env:start
+
+      - name: Install object cache drop-in
+        if: ${{ inputs.memcached }}
+        run: cp src/wp-content/object-cache.php build/wp-content/object-cache.php
+
+      - name: Log running Docker containers
+        run: docker ps -a
+
+      - name: Docker debug information
+        run: |
+          docker -v
+          docker compose run --rm mysql mysql --version
+          docker compose run --rm php php --version
+          docker compose run --rm php php -m
+          docker compose run --rm php php -i
+          docker compose run --rm php locale -a
+
+      - name: Install WordPress
+        run: npm run env:install
+
+      - name: Install WordPress Importer plugin
+        run: npm run env:cli -- plugin install wordpress-importer --activate --path=/var/www/${{ env.LOCAL_DIR }}
+
+      - name: Import mock data
+        run: |
+          curl -O https://raw.githubusercontent.com/WordPress/theme-test-data/b9752e0533a5acbb876951a8cbb5bcc69a56474c/themeunittestdata.wordpress.xml
+          npm run env:cli -- import themeunittestdata.wordpress.xml --authors=create --path=/var/www/${{ env.LOCAL_DIR }}
+          rm themeunittestdata.wordpress.xml
+
+      - name: Deactivate WordPress Importer plugin
+        run: npm run env:cli -- plugin deactivate wordpress-importer --path=/var/www/${{ env.LOCAL_DIR }}
+
+      - name: Update permalink structure
+        run: npm run env:cli -- rewrite structure '/%year%/%monthnum%/%postname%/' --path=/var/www/${{ env.LOCAL_DIR }}
+
+      - name: Install additional languages
+        run: |
+          npm run env:cli -- language core install de_DE --path=/var/www/${{ env.LOCAL_DIR }}
+          npm run env:cli -- language plugin install de_DE --all --path=/var/www/${{ env.LOCAL_DIR }}
+          npm run env:cli -- language theme install de_DE --all --path=/var/www/${{ env.LOCAL_DIR }}
+
+      # Prevent background update checks from impacting test stability.
+      - name: Disable external HTTP requests
+        run: npm run env:cli -- config set WP_HTTP_BLOCK_EXTERNAL true --raw --type=constant --path=/var/www/${{ env.LOCAL_DIR }}
+
+      # Prevent background tasks from impacting test stability.
+      - name: Disable cron
+        run: npm run env:cli -- config set DISABLE_WP_CRON true --raw --type=constant --path=/var/www/${{ env.LOCAL_DIR }}
+
+      - name: List defined constants
+        run: npm run env:cli -- config list --path=/var/www/${{ env.LOCAL_DIR }}
+
+      - name: Install MU plugin
+        run: |
+          mkdir ./${{ env.LOCAL_DIR }}/wp-content/mu-plugins
+          cp ./tests/performance/wp-content/mu-plugins/server-timing.php ./${{ env.LOCAL_DIR }}/wp-content/mu-plugins/server-timing.php
+
+      - name: Run performance tests (current commit)
+        run: npm run test:performance
+
+      - name: Download previous build artifact (target branch or previous commit)
+        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
+        id: get-previous-build
+        with:
+          script: |
+            const artifacts = await github.rest.actions.listArtifactsForRepo({
+              owner: context.repo.owner,
+              repo: context.repo.repo,
+              name: 'wordpress-build-' + process.env.TARGET_SHA,
+            });
+
+            const matchArtifact = artifacts.data.artifacts[0];
+
+            if ( ! matchArtifact ) {
+              core.setFailed( 'No artifact found!' );
+              return false;
+            }
+
+            const download = await github.rest.actions.downloadArtifact( {
+              owner: context.repo.owner,
+              repo: context.repo.repo,
+              artifact_id: matchArtifact.id,
+              archive_format: 'zip',
+            } );
+
+            const fs = require( 'fs' );
+            fs.writeFileSync( '${{ github.workspace }}/before.zip', Buffer.from( download.data ) )
+
+            return true;
+
+      - name: Unzip the build
+        if: ${{ steps.get-previous-build.outputs.result }}
+        run: |
+          unzip ${{ github.workspace }}/before.zip
+          unzip -o ${{ github.workspace }}/wordpress.zip
+
+      - name: Run any database upgrades
+        if: ${{ steps.get-previous-build.outputs.result }}
+        run: npm run env:cli -- core update-db --path=/var/www/${{ env.LOCAL_DIR }}
+
+      - name: Flush cache
+        if: ${{ steps.get-previous-build.outputs.result }}
+        run: npm run env:cli -- cache flush --path=/var/www/${{ env.LOCAL_DIR }}
+
+      - name: Delete expired transients
+        if: ${{ steps.get-previous-build.outputs.result }}
+        run: npm run env:cli -- transient delete --expired --path=/var/www/${{ env.LOCAL_DIR }}
+
+      - name: Run target performance tests (previous/target commit)
+        if: ${{ steps.get-previous-build.outputs.result }}
+        env:
+          TEST_RESULTS_PREFIX: before
+        run: npm run test:performance
+
+      - name: Set the environment to the baseline version
+        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }}
+        run: |
+          npm run env:cli -- core update --version=${{ env.BASE_TAG }} --force --path=/var/www/${{ env.LOCAL_DIR }}
+          npm run env:cli -- core version --path=/var/www/${{ env.LOCAL_DIR }}
+
+      - name: Run any database upgrades
+        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }}
+        run: npm run env:cli -- core update-db --path=/var/www/${{ env.LOCAL_DIR }}
+
+      - name: Flush cache
+        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }}
+        run: npm run env:cli -- cache flush --path=/var/www/${{ env.LOCAL_DIR }}
+
+      - name: Delete expired transients
+        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }}
+        run: npm run env:cli -- transient delete --expired --path=/var/www/${{ env.LOCAL_DIR }}
+
+      - name: Run baseline performance tests
+        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }}
+        env:
+          TEST_RESULTS_PREFIX: base
+        run: npm run test:performance
+
+      - name: Archive artifacts
+        uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
+        if: always()
+        with:
+          name: performance-artifacts${{ inputs.memcached && '-memcached' || '' }}-${{ github.run_id }}
+          path: artifacts
+          if-no-files-found: ignore
+
+      - name: Compare results
+        run: node ./tests/performance/compare-results.js ${{ runner.temp }}/summary.md
+
+      - name: Add workflow summary
+        run: cat ${{ runner.temp }}/summary.md >> $GITHUB_STEP_SUMMARY
+
+      - name: Set the base sha
+        # Only needed when publishing results.
+        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! inputs.memcached }}
+        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
+        id: base-sha
+        with:
+          github-token: ${{ secrets.GITHUB_TOKEN }}
+          script: |
+            const baseRef = await github.rest.git.getRef({ owner: context.repo.owner, repo: context.repo.repo, ref: 'tags/${{ env.BASE_TAG }}' });
+            return baseRef.data.object.sha;
+
+      - name: Set commit details
+        # Only needed when publishing results.
+        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! inputs.memcached }}
+        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
+        id: commit-timestamp
+        with:
+          github-token: ${{ secrets.GITHUB_TOKEN }}
+          script: |
+            const commit_details = await github.rest.git.getCommit({ owner: context.repo.owner, repo: context.repo.repo, commit_sha: context.sha });
+            return parseInt((new Date( commit_details.data.author.date ).getTime() / 1000).toFixed(0))
+
+      - name: Publish performance results
+        # Only publish results on pushes to trunk.
+        if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! inputs.memcached }}
+        env:
+          BASE_SHA: ${{ steps.base-sha.outputs.result }}
+          COMMITTED_AT: ${{ steps.commit-timestamp.outputs.result }}
+          CODEVITALS_PROJECT_TOKEN: ${{ secrets.CODEVITALS_PROJECT_TOKEN }}
+          HOST_NAME: "www.codevitals.run"
+        run: node ./tests/performance/log-results.js $CODEVITALS_PROJECT_TOKEN trunk $GITHUB_SHA $BASE_SHA $COMMITTED_AT $HOST_NAME
+
+      - name: Ensure version-controlled files are not modified or deleted
+        run: git diff --exit-code
</ins></span></pre></div>
<a id="trunkgithubworkflowsreusablephpcompatibilityyml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/.github/workflows/reusable-php-compatibility.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/reusable-php-compatibility.yml                            (rev 0)
+++ trunk/.github/workflows/reusable-php-compatibility.yml      2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,85 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+##
+# A reusable workflow that runs PHP compatibility tests.
+##
+name: PHP Compatibility
+
+on:
+  workflow_call:
+    inputs:
+      php-version:
+        description: 'The PHP version to use.'
+        required: false
+        type: 'string'
+        default: 'latest'
+
+jobs:
+  # Runs PHP compatibility tests.
+  #
+  # Violations are reported inline with annotations.
+  #
+  # Performs the following steps:
+  # - Checks out the repository.
+  # - Sets up PHP.
+  # - Logs debug information.
+  # - Configures caching for PHP compatibility scans.
+  # - Installs Composer dependencies.
+  # - Make Composer packages available globally.
+  # - Runs the PHP compatibility tests.
+  # - Generate a report for displaying issues as pull request annotations.
+  # - Ensures version-controlled files are not modified or deleted.
+  php-compatibility:
+    name: Run compatibility checks
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+    timeout-minutes: 20
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+        with:
+          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
+
+      - name: Set up PHP
+        uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0
+        with:
+          php-version: ${{ inputs.php-version }}
+          coverage: none
+          tools: cs2pr
+
+      - name: Log debug information
+        run: |
+          composer --version
+
+      # This date is used to ensure that the PHP compatibility cache is cleared at least once every week.
+      # http://man7.org/linux/man-pages/man1/date.1.html
+      - name: "Get last Monday's date"
+        id: get-date
+        run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
+
+      - name: Cache PHP compatibility scan cache
+        uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
+        with:
+          path: .cache/phpcompat.json
+          key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-php-${{ inputs.php-version }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }}
+
+      # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
+      # passing a custom cache suffix ensures that the cache is flushed at least once per week.
+      - name: Install Composer dependencies
+        uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0
+        with:
+          custom-cache-suffix: ${{ steps.get-date.outputs.date }}
+
+      - name: Make Composer packages available globally
+        run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
+
+      - name: Run PHP compatibility tests
+        id: phpcs
+        run: phpcs --standard=phpcompat.xml.dist --report-full --report-checkstyle=./.cache/phpcs-compat-report.xml
+
+      - name: Show PHPCompatibility results in PR
+        if: ${{ always() && steps.phpcs.outcome == 'failure' }}
+        run: cs2pr ./.cache/phpcs-compat-report.xml
+
+      - name: Ensure version-controlled files are not modified or deleted
+        run: git diff --exit-code
</ins></span></pre></div>
<a id="trunkgithubworkflowsreusablephpunittestsymlfromrev58164trunkgithubworkflowsphpunittestsrunyml"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: trunk/.github/workflows/reusable-phpunit-tests.yml (from rev 58164, trunk/.github/workflows/phpunit-tests-run.yml)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/reusable-phpunit-tests.yml                                (rev 0)
+++ trunk/.github/workflows/reusable-phpunit-tests.yml  2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,192 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+##
+# A reusable workflow that runs the PHPUnit test suite with the specified configuration.
+##
+name: Run PHPUnit tests
+
+on:
+  workflow_call:
+    inputs:
+      os:
+        description: 'Operating system to run tests on'
+        required: false
+        type: 'string'
+        default: 'ubuntu-latest'
+      php:
+        description: 'The version of PHP to use, in the format of X.Y'
+        required: true
+        type: 'string'
+      db-type:
+        description: 'Database type. Valid types are mysql and mariadb'
+        required: false
+        type: 'string'
+        default: 'mysql'
+      db-version:
+        description: 'Database version'
+        required: false
+        type: 'string'
+        default: '8.0'
+      multisite:
+        description: 'Whether to run tests as multisite'
+        required: false
+        type: 'boolean'
+        default: false
+      memcached:
+        description: 'Whether to test with memcached enabled'
+        required: false
+        type: 'boolean'
+        default: false
+      phpunit-config:
+        description: 'The PHPUnit configuration file to use'
+        required: false
+        type: 'string'
+        default: 'phpunit.xml.dist'
+      tests-domain:
+        description: 'The domain to use for the tests'
+        required: false
+        type: 'string'
+        default: 'example.org'
+      report:
+        description: 'Whether to report results to WordPress.org Hosting Tests'
+        required: false
+        type: 'boolean'
+        default: false
+env:
+  LOCAL_PHP: ${{ inputs.php }}-fpm
+  LOCAL_DB_TYPE: ${{ inputs.db-type }}
+  LOCAL_DB_VERSION: ${{ inputs.db-version }}
+  LOCAL_PHP_MEMCACHED: ${{ inputs.memcached }}
+  LOCAL_WP_TESTS_DOMAIN: ${{ inputs.tests-domain }}
+  PHPUNIT_CONFIG: ${{ inputs.phpunit-config }}
+  PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
+
+jobs:
+  # Runs the PHPUnit tests for WordPress.
+  #
+  # Performs the following steps:
+  # - Sets environment variables.
+  # - Checks out the repository.
+  # - Sets up Node.js.
+  # - Sets up PHP.
+  # - Installs Composer dependencies.
+  # - Installs npm dependencies
+  # - Logs general debug information about the runner.
+  # - Logs Docker debug information (about the Docker installation within the runner).
+  # - Starts the WordPress Docker container.
+  # - Logs the running Docker containers.
+  # - Logs debug information about what's installed within the WordPress Docker containers.
+  # - Install WordPress within the Docker container.
+  # - Run the PHPUnit tests.
+  # - Ensures version-controlled files are not modified or deleted.
+  # - Checks out the WordPress Test reporter repository.
+  # - Submit the test results to the WordPress.org host test results.
+  phpunit-tests:
+    name: PHP ${{ inputs.php }} / ${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }}
+    runs-on: ${{ inputs.os }}
+    timeout-minutes: 20
+
+    steps:
+      - name: Configure environment variables
+        run: |
+          echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
+          echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
+
+      - name: Checkout repository
+        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+        with:
+          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
+
+      - name: Set up Node.js
+        uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
+        with:
+          node-version-file: '.nvmrc'
+          cache: npm
+
+      ##
+      # This allows Composer dependencies to be installed using a single step.
+      #
+      # Since the tests are currently run within the Docker containers where the PHP version varies,
+      # the same PHP version needs to be configured for the action runner machine so that the correct
+      # dependency versions are installed and cached.
+      ##
+      - name: Set up PHP
+        uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0
+        with:
+          php-version: '${{ inputs.php }}'
+          coverage: none
+
+      # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
+      # passing a custom cache suffix ensures that the cache is flushed at least once per week.
+      - name: Install Composer dependencies
+        uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0
+        with:
+          custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F")
+
+      - name: Install npm dependencies
+        run: npm ci
+
+      - name: General debug information
+        run: |
+          npm --version
+          node --version
+          curl --version
+          git --version
+          composer --version
+          locale -a
+
+      - name: Docker debug information
+        run: |
+          docker -v
+
+      - name: Start Docker environment
+        run: |
+          npm run env:start
+
+      - name: Log running Docker containers
+        run: docker ps -a
+
+      - name: WordPress Docker container debug information
+        run: |
+          docker compose run --rm mysql ${{ env.LOCAL_DB_TYPE }} --version
+          docker compose run --rm php php --version
+          docker compose run --rm php php -m
+          docker compose run --rm php php -i
+          docker compose run --rm php locale -a
+
+      - name: Install WordPress
+        run: npm run env:install
+
+      - name: Run PHPUnit tests
+        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }}
+
+      - name: Run AJAX tests
+        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax
+
+      - name: Run ms-files tests as a multisite install
+        if: ${{ inputs.multisite }}
+        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ms-files
+
+      - name: Run external HTTP tests
+        if: ${{ ! inputs.multisite }}
+        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group external-http
+
+      # __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist.
+      - name: Run (Xdebug) tests
+        if: ${{ inputs.php != '8.3' }}
+        run: LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__
+
+      - name: Ensure version-controlled files are not modified or deleted
+        run: git diff --exit-code
+
+      - name: Checkout the WordPress Test Reporter
+        if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && inputs.report }}
+        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+        with:
+          repository: 'WordPress/phpunit-test-runner'
+          path: 'test-runner'
+          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
+
+      - name: Submit test results to the WordPress.org host test results
+        if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && inputs.report }}
+        env:
+          WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}"
+        run: docker compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php
</ins></span></pre></div>
<a id="trunkgithubworkflowsreusabletestcorebuildprocessymlfromrev58164trunkgithubworkflowscallabletestcorebuildprocessyml"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: trunk/.github/workflows/reusable-test-core-build-process.yml (from rev 58164, trunk/.github/workflows/callable-test-core-build-process.yml)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/reusable-test-core-build-process.yml                              (rev 0)
+++ trunk/.github/workflows/reusable-test-core-build-process.yml        2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,97 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+##
+# A reusable workflow that tests the WordPress Core build process.
+##
+name: Test the WordPress Build Process
+
+on:
+  workflow_call:
+    inputs:
+      os:
+        description: 'Operating system to run tests on'
+        required: false
+        type: 'string'
+        default: 'ubuntu-latest'
+      directory:
+        description: 'Directory to run WordPress from. Valid values are `src` or `build`'
+        required: false
+        type: 'string'
+        default: 'src'
+      test-emoji:
+        description: 'Whether to run the grunt precommit:emoji script.'
+        required: false
+        type: 'boolean'
+        default: true
+
+env:
+  PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
+
+jobs:
+  # Verifies that installing npm dependencies and building WordPress works as expected.
+  #
+  # Performs the following steps:
+  # - Checks out the repository.
+  # - Sets up Node.js.
+  # - Logs debug information about the GitHub Action runner.
+  # - Installs npm dependencies.
+  # - Builds WordPress to run from the desired location (src or build).
+  # - Ensures version-controlled files are not modified or deleted.
+  # - Creates a ZIP of the built WordPress files (when building to the build directory).
+  # - Cleans up after building WordPress.
+  # - Ensures version-controlled files are not modified or deleted.
+  # - Uploads the ZIP as a GitHub Actions artifact (when building to the build directory).
+  build-process-tests:
+    name: Core running from ${{ inputs.directory }} / ${{ inputs.os == 'macos-latest' && 'MacOS' || inputs.os == 'windows-latest' && 'Windows' || 'Linux' }}
+    runs-on: ${{ inputs.os }}
+    timeout-minutes: 20
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+        with:
+          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
+
+      - name: Set up Node.js
+        uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
+        with:
+          node-version-file: '.nvmrc'
+          cache: npm
+
+      - name: Log debug information
+        run: |
+          npm --version
+          node --version
+          curl --version
+          git --version
+
+      - name: Install npm Dependencies
+        run: npm ci
+
+      - name: Run Emoji precommit task
+        if: ${{ inputs.test-emoji }}
+        run: npm run grunt precommit:emoji
+        env:
+          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+      - name: Build WordPress to run from ${{ inputs.directory }}
+        run: npm run build${{ inputs.directory == 'src' && ':dev' || '' }}
+
+      - name: Ensure version-controlled files are not modified or deleted during building
+        run: git diff --exit-code
+
+      - name: Create ZIP of built files
+        if: ${{ inputs.directory == 'build' && 'ubuntu-latest' == inputs.os }}
+        run: zip -r wordpress.zip build/.
+
+      - name: Clean after building to run from ${{ inputs.directory }}
+        run: npm run grunt clean${{ inputs.directory == 'src' && ' -- --dev' || '' }}
+
+      - name: Ensure version-controlled files are not modified or deleted during cleaning
+        run: git diff --exit-code
+
+      - name: Upload ZIP as a GitHub Actions artifact
+        uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
+        if: ${{ inputs.directory == 'build' && 'ubuntu-latest' == inputs.os }}
+        with:
+          name: wordpress-build-${{ github.event_name == 'pull_request' && github.event.number || github.sha }}
+          path: wordpress.zip
+          if-no-files-found: error
</ins></span></pre></div>
<a id="trunkgithubworkflowsreusabletestgutenbergbuildprocessymlfromrev58164trunkgithubworkflowscallabletestgutenbergbuildprocessyml"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: trunk/.github/workflows/reusable-test-gutenberg-build-process.yml (from rev 58164, trunk/.github/workflows/callable-test-gutenberg-build-process.yml)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/reusable-test-gutenberg-build-process.yml                         (rev 0)
+++ trunk/.github/workflows/reusable-test-gutenberg-build-process.yml   2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,92 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+##
+# A reusable workflow that tests the Gutenberg plugin build process when run within a wordpress-develop checkout.
+##
+name: Test the Gutenberg plugin Build Process
+
+on:
+  workflow_call:
+    inputs:
+      os:
+        description: 'Operating system to run tests on'
+        required: false
+        type: 'string'
+        default: 'ubuntu-latest'
+      directory:
+        description: 'Directory to run WordPress from. Valid values are `src` or `build`'
+        required: false
+        type: 'string'
+        default: 'src'
+
+env:
+  GUTENBERG_DIRECTORY: ${{ inputs.directory == 'build' && 'build' || 'src' }}/wp-content/plugins/gutenberg
+  PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
+  NODE_OPTIONS: '--max-old-space-size=8192'
+
+jobs:
+  # Verifies that installing npm dependencies and building the Gutenberg plugin works as expected.
+  #
+  # Performs the following steps:
+  # - Checks out the repository.
+  # - Checks out the Gutenberg plugin into the plugins directory.
+  # - Sets up Node.js.
+  # - Logs debug information about the GitHub Action runner.
+  # - Installs Core npm dependencies.
+  # - Installs Gutenberg npm dependencies.
+  # - Runs the Gutenberg build process.
+  # - Builds WordPress to run from the relevant location (src or build).
+  # - Builds Gutenberg.
+  # - Ensures version-controlled files are not modified or deleted.
+  build-process-tests:
+    name: Gutenberg running from ${{ inputs.directory }} / ${{ inputs.os == 'macos-latest' && 'MacOS' || inputs.os == 'windows-latest' && 'Windows' || 'Linux' }}
+    runs-on: ${{ inputs.os }}
+    timeout-minutes: 30
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+        with:
+          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
+
+      - name: Checkout Gutenberg plugin
+        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+        with:
+          repository: 'WordPress/gutenberg'
+          path: ${{ env.GUTENBERG_DIRECTORY }}
+          show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
+
+      - name: Set up Node.js
+        uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
+        with:
+          node-version-file: '.nvmrc'
+          cache: npm
+          cache-dependency-path: |
+            package-lock.json
+            ${{ env.GUTENBERG_DIRECTORY }}/package-lock.json
+
+      - name: Log debug information
+        run: |
+          npm --version
+          node --version
+          curl --version
+          git --version
+
+      - name: Install Core Dependencies
+        run: npm ci
+
+      - name: Install Gutenberg Dependencies
+        run: npm ci
+        working-directory: ${{ env.GUTENBERG_DIRECTORY }}
+
+      - name: Build Gutenberg
+        run: npm run build
+        working-directory: ${{ env.GUTENBERG_DIRECTORY }}
+
+      - name: Build WordPress to run from ${{ inputs.directory }}
+        run: npm run build${{ inputs.directory == 'src' && ':dev' || '' }}
+
+      - name: Run Gutenberg build script after building Core to run from ${{ inputs.directory }}
+        run: npm run build
+        working-directory: ${{ env.GUTENBERG_DIRECTORY }}
+
+      - name: Ensure version-controlled files are not modified or deleted during building
+        run: git diff --exit-code
</ins></span></pre></div>
<a id="trunkgithubworkflowsreusableupgradetestingymlfromrev58164trunkgithubworkflowsupgradetestingrunyml"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: trunk/.github/workflows/reusable-upgrade-testing.yml (from rev 58164, trunk/.github/workflows/upgrade-testing-run.yml)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/reusable-upgrade-testing.yml                              (rev 0)
+++ trunk/.github/workflows/reusable-upgrade-testing.yml        2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,89 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# A reusable workflow that runs WordPress upgrade testing under the conditions provided.
+name: Upgrade Tests
+
+on:
+  workflow_call:
+    inputs:
+      os:
+        description: 'Operating system to run tests on.'
+        required: false
+        type: 'string'
+        default: 'ubuntu-latest'
+      wp:
+        description: 'The version of WordPress to start with.'
+        required: true
+        type: 'string'
+      new-version:
+        description: 'The version of WordPress to update to.'
+        type: 'string'
+        default: 'latest'
+      php:
+        description: 'The version of PHP to use. Expected format: X.Y.'
+        required: true
+        type: 'string'
+      multisite:
+        description: 'Whether to run tests as multisite.'
+        required: false
+        type: 'boolean'
+        default: false
+      db-type:
+        description: 'Database type. Valid types are mysql and mariadb.'
+        required: false
+        type: 'string'
+        default: 'mysql'
+      db-version:
+        description: 'Database version.'
+        required: false
+        type: 'string'
+        default: '5.7'
+
+jobs:
+  # Runs upgrade tests on a build of WordPress.
+  #
+  # Performs the following steps:
+  # - Sets up PHP.
+  # - Starts the database server.
+  # - Downloads the specified version of WordPress.
+  # - Creates a `wp-config.php` file.
+  # - Installs WordPress.
+  # - Updates to the latest minor version.
+  # - Updates to the version of WordPress being tested.
+  upgrade-tests:
+    name: ${{ inputs.wp }} to ${{ inputs.new-version }} / PHP ${{ inputs.php }} with ${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}
+    runs-on: ${{ inputs.os }}
+    timeout-minutes: 20
+
+    services:
+      database:
+        image: ${{ inputs.db-type }}:${{ inputs.db-version }}
+        ports:
+          - 3306
+        options: --health-cmd="mysqladmin ping" --health-interval=30s --health-timeout=10s --health-retries=5 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=test_db --entrypoint sh ${{ inputs.db-type }}:${{ inputs.db-version }} -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
+
+    steps:
+      - name: Set up PHP ${{ inputs.php }}
+        uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0
+        with:
+          php-version: '${{ inputs.php }}'
+          coverage: none
+          tools: wp-cli
+
+      - name: Start the database server
+        run: |
+          sudo systemctl start ${{ inputs.db-type }}
+
+      - name: Download WordPress ${{ inputs.wp }}
+        run: wp core download --version=${{ inputs.wp }}
+
+      - name: Create wp-config.php file
+        run: wp config create --dbname=test_db --dbuser=root --dbpass=root --dbhost=127.0.0.1:${{ job.services.database.ports['3306'] }}
+
+      - name: Install WordPress
+        run: wp core ${{ inputs.multisite && 'multisite-' || '' }}install --url=http://localhost/ --title="Upgrade Test" --admin_user=admin --admin_password=password --admin_email=me@example.org --skip-email
+
+      - name: Update to the latest minor version
+        run: wp core update --minor
+
+      - name: Upgrade to WordPress ${{ inputs.new-version }}
+        run: |
+          wp core update${{ 'latest' != inputs.new-version && format( ' --version={0}', inputs.new-version ) || '' }}
</ins></span></pre></div>
<a id="trunkgithubworkflowstestbuildprocessesyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/.github/workflows/test-build-processes.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/test-build-processes.yml  2024-05-17 13:11:27 UTC (rev 58164)
+++ trunk/.github/workflows/test-build-processes.yml    2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -31,7 +31,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">   # Tests the WordPress Core build process on multiple operating systems.
</span><span class="cx" style="display: block; padding: 0 10px">   test-core-build-process:
</span><span class="cx" style="display: block; padding: 0 10px">     name: Core running from ${{ matrix.directory }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    uses: WordPress/wordpress-develop/.github/workflows/callable-test-core-build-process.yml@trunk
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     permissions:
</span><span class="cx" style="display: block; padding: 0 10px">       contents: read
</span><span class="cx" style="display: block; padding: 0 10px">     if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -54,7 +54,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">   # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability.
</span><span class="cx" style="display: block; padding: 0 10px">   test-core-build-process-macos:
</span><span class="cx" style="display: block; padding: 0 10px">     name: Core running from ${{ matrix.directory }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    uses: WordPress/wordpress-develop/.github/workflows/callable-test-core-build-process.yml@trunk
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     permissions:
</span><span class="cx" style="display: block; padding: 0 10px">       contents: read
</span><span class="cx" style="display: block; padding: 0 10px">     if: ${{ github.repository == 'WordPress/wordpress-develop' }}
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -70,7 +70,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">   # Tests the Gutenberg plugin build process on multiple operating systems when run within a wordpress-develop checkout.
</span><span class="cx" style="display: block; padding: 0 10px">   test-gutenberg-build-process:
</span><span class="cx" style="display: block; padding: 0 10px">     name: Gutenberg running from ${{ matrix.directory }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    uses: WordPress/wordpress-develop/.github/workflows/callable-test-gutenberg-build-process.yml@trunk
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    uses: WordPress/wordpress-develop/.github/workflows/reusable-test-gutenberg-build-process.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     permissions:
</span><span class="cx" style="display: block; padding: 0 10px">       contents: read
</span><span class="cx" style="display: block; padding: 0 10px">     if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -93,7 +93,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">   # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability.
</span><span class="cx" style="display: block; padding: 0 10px">   test-gutenberg-build-process-macos:
</span><span class="cx" style="display: block; padding: 0 10px">     name: Gutenberg running from ${{ matrix.directory }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    uses: WordPress/wordpress-develop/.github/workflows/callable-test-gutenberg-build-process.yml@trunk
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    uses: WordPress/wordpress-develop/.github/workflows/reusable-test-gutenberg-build-process.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     permissions:
</span><span class="cx" style="display: block; padding: 0 10px">       contents: read
</span><span class="cx" style="display: block; padding: 0 10px">     if: ${{ github.repository == 'WordPress/wordpress-develop' }}
</span></span></pre></div>
<a id="trunkgithubworkflowsupgradetestingrunyml"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: trunk/.github/workflows/upgrade-testing-run.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/upgrade-testing-run.yml   2024-05-17 13:11:27 UTC (rev 58164)
+++ trunk/.github/workflows/upgrade-testing-run.yml     2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,89 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-# A callable workflow that runs WordPress upgrade testing under the conditions provided.
-name: Upgrade Tests
-
-on:
-  workflow_call:
-    inputs:
-      os:
-        description: 'Operating system to run tests on.'
-        required: false
-        type: 'string'
-        default: 'ubuntu-latest'
-      wp:
-        description: 'The version of WordPress to start with.'
-        required: true
-        type: 'string'
-      new-version:
-        description: 'The version of WordPress to update to.'
-        type: 'string'
-        default: 'latest'
-      php:
-        description: 'The version of PHP to use. Expected format: X.Y.'
-        required: true
-        type: 'string'
-      multisite:
-        description: 'Whether to run tests as multisite.'
-        required: false
-        type: 'boolean'
-        default: false
-      db-type:
-        description: 'Database type. Valid types are mysql and mariadb.'
-        required: false
-        type: 'string'
-        default: 'mysql'
-      db-version:
-        description: 'Database version.'
-        required: false
-        type: 'string'
-        default: '5.7'
-
-jobs:
-  # Runs upgrade tests on a build of WordPress.
-  #
-  # Performs the following steps:
-  # - Sets up PHP.
-  # - Starts the database server.
-  # - Downloads the specified version of WordPress.
-  # - Creates a `wp-config.php` file.
-  # - Installs WordPress.
-  # - Updates to the latest minor version.
-  # - Updates to the version of WordPress being tested.
-  upgrade-tests:
-    name: ${{ inputs.wp }} to ${{ inputs.new-version }} / PHP ${{ inputs.php }} with ${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}
-    runs-on: ${{ inputs.os }}
-    timeout-minutes: 20
-
-    services:
-      database:
-        image: ${{ inputs.db-type }}:${{ inputs.db-version }}
-        ports:
-          - 3306
-        options: --health-cmd="mysqladmin ping" --health-interval=30s --health-timeout=10s --health-retries=5 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=test_db --entrypoint sh ${{ inputs.db-type }}:${{ inputs.db-version }} -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
-
-    steps:
-      - name: Set up PHP ${{ inputs.php }}
-        uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0
-        with:
-          php-version: '${{ inputs.php }}'
-          coverage: none
-          tools: wp-cli
-
-      - name: Start the database server
-        run: |
-          sudo systemctl start ${{ inputs.db-type }}
-
-      - name: Download WordPress ${{ inputs.wp }}
-        run: wp core download --version=${{ inputs.wp }}
-
-      - name: Create wp-config.php file
-        run: wp config create --dbname=test_db --dbuser=root --dbpass=root --dbhost=127.0.0.1:${{ job.services.database.ports['3306'] }}
-
-      - name: Install WordPress
-        run: wp core ${{ inputs.multisite && 'multisite-' || '' }}install --url=http://localhost/ --title="Upgrade Test" --admin_user=admin --admin_password=password --admin_email=me@example.org --skip-email
-
-      - name: Update to the latest minor version
-        run: wp core update --minor
-
-      - name: Upgrade to WordPress ${{ inputs.new-version }}
-        run: |
-          wp core update${{ 'latest' != inputs.new-version && format( ' --version={0}', inputs.new-version ) || '' }}
</del></span></pre></div>
<a id="trunkgithubworkflowsupgradetestingyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/.github/workflows/upgrade-testing.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/upgrade-testing.yml       2024-05-17 13:11:27 UTC (rev 58164)
+++ trunk/.github/workflows/upgrade-testing.yml 2024-05-17 17:41:40 UTC (rev 58165)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -35,7 +35,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">   # Spawns upgrade testing from WordPress 6.x versions with MySQL.
</span><span class="cx" style="display: block; padding: 0 10px">   upgrade-tests-wp-6x-mysql:
</span><span class="cx" style="display: block; padding: 0 10px">     name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    uses: WordPress/wordpress-develop/.github/workflows/upgrade-testing-run.yml@trunk
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
</span><span class="cx" style="display: block; padding: 0 10px">     permissions:
</span><span class="cx" style="display: block; padding: 0 10px">       contents: read
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -60,7 +60,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">   # Spawns upgrade testing from WordPress 5.x versions on PHP 7.x with MySQL.
</span><span class="cx" style="display: block; padding: 0 10px">   upgrade-tests-wp-5x-php-7x-mysql:
</span><span class="cx" style="display: block; padding: 0 10px">     name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    uses: WordPress/wordpress-develop/.github/workflows/upgrade-testing-run.yml@trunk
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
</span><span class="cx" style="display: block; padding: 0 10px">     strategy:
</span><span class="cx" style="display: block; padding: 0 10px">       fail-fast: false
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -87,7 +87,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">   # - array/string offset with curly braces.
</span><span class="cx" style="display: block; padding: 0 10px">   upgrade-tests-wp-5x-php-8x-mysql:
</span><span class="cx" style="display: block; padding: 0 10px">     name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    uses: WordPress/wordpress-develop/.github/workflows/upgrade-testing-run.yml@trunk
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
</span><span class="cx" style="display: block; padding: 0 10px">     strategy:
</span><span class="cx" style="display: block; padding: 0 10px">       fail-fast: false
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -110,7 +110,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">   # Spawns upgrade testing from WordPress 4.x versions on PHP 7.x with MySQL.
</span><span class="cx" style="display: block; padding: 0 10px">   upgrade-tests-wp-4x-php-7x-mysql:
</span><span class="cx" style="display: block; padding: 0 10px">     name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    uses: WordPress/wordpress-develop/.github/workflows/upgrade-testing-run.yml@trunk
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
</span><span class="cx" style="display: block; padding: 0 10px">     strategy:
</span><span class="cx" style="display: block; padding: 0 10px">       fail-fast: false
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -137,7 +137,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">   # - array/string offset with curly braces.
</span><span class="cx" style="display: block; padding: 0 10px">   upgrade-tests-wp-4x-php-8x-mysql:
</span><span class="cx" style="display: block; padding: 0 10px">     name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    uses: WordPress/wordpress-develop/.github/workflows/upgrade-testing-run.yml@trunk
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
</ins><span class="cx" style="display: block; padding: 0 10px">     if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
</span><span class="cx" style="display: block; padding: 0 10px">     strategy:
</span><span class="cx" style="display: block; padding: 0 10px">       fail-fast: false
</span></span></pre>
</div>
</div>

</body>
</html>