<!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>[58611] branches/5.4: Build/Test Tools: Make use of new reusable workflows for 5.4.</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/58611">58611</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/58611","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-07-01 19:17:07 +0000 (Mon, 01 Jul 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: Make use of new reusable workflows for 5.4.
This updates the 5.4 branch to utilize the new reusable workflows in trunk introduced in <a href="https://core.trac.wordpress.org/changeset/58165">[58165]</a>.
This also includes backports for a some additional improvements and bug fixes that are necessary for the local development environment to continue working long term:
- The image and platform properties for the mysql container have been updated to always prefer `amd64` containers (<a href="https://core.trac.wordpress.org/ticket/60822">#60822</a>).
- `macos-13` is now pinned for MacOS jobs instead of `macos-latest` (<a href="https://core.trac.wordpress.org/ticket/61340">#61340</a>).
- Migrating to Docker Compose V2 (<a href="https://core.trac.wordpress.org/ticket/60901">#60901</a>).
- Removing the version property from docker-compose.yml (<a href="https://core.trac.wordpress.org/ticket/59416">#59416</a>).
- Improvements to how artifacts and comments for Playground testing are generated.
- Removing SVN related commands causing failures (<a href="https://core.trac.wordpress.org/ticket/61216">#61216</a>).
- Updating the `actions/github-scripts` action to the latest version.
- Cache the results of `PHP_CodeSniffer` runs (<a href="https://core.trac.wordpress.org/ticket/49783">#49783</a>).
- Move the Memcached container into the Docker Compose config (<a href="https://core.trac.wordpress.org/ticket/55700">#55700</a>).
- Improvements to the `healthcheck` command for the `mysql` container (<a href="https://core.trac.wordpress.org/ticket/58867">#58867</a>).
- Skip some tests when not in the primary branch (<a href="https://core.trac.wordpress.org/ticket/50401">#50401</a>).
Merges <a href="https://core.trac.wordpress.org/changeset/49264">[49264]</a>, <a href="https://core.trac.wordpress.org/changeset/51673">[51673]</a>, <a href="https://core.trac.wordpress.org/changeset/52179">[52179]</a>, <a href="https://core.trac.wordpress.org/changeset/53552">[53552]</a>, <a href="https://core.trac.wordpress.org/changeset/53895">[53895]</a>, <a href="https://core.trac.wordpress.org/changeset/56464">[56464]</a>, <a href="https://core.trac.wordpress.org/changeset/57918">[57918]</a>, <a href="https://core.trac.wordpress.org/changeset/58157">[58157]</a>, <a href="https://core.trac.wordpress.org/changeset/57124">[57124]</a>, <a href="https://core.trac.wordpress.org/changeset/57125">[57125]</a>, <a href="https://core.trac.wordpress.org/changeset/57249">[57249]</a> to the 5.4 branch.
Props johnbillion, joemcgill, swissspidy, thelovekesh, narenin, mukesh27, JeffPaul, peterwilsoncc, zieladam, ockham, SergeyBiryukov, jorbin, Clorith, afragen, jrf.
See <a href="https://core.trac.wordpress.org/ticket/49783">#49783</a>, <a href="https://core.trac.wordpress.org/ticket/58867">#58867</a>, <a href="https://core.trac.wordpress.org/ticket/61340">#61340</a>, <a href="https://core.trac.wordpress.org/ticket/60822">#60822</a>, <a href="https://core.trac.wordpress.org/ticket/61216">#61216</a>, <a href="https://core.trac.wordpress.org/ticket/60901">#60901</a>, <a href="https://core.trac.wordpress.org/ticket/61101">#61101</a>, <a href="https://core.trac.wordpress.org/ticket/59416">#59416</a>, <a href="https://core.trac.wordpress.org/ticket/59805">#59805</a>, <a href="https://core.trac.wordpress.org/ticket/61213">#61213</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branches54githubworkflowscodingstandardsyml">branches/5.4/.github/workflows/coding-standards.yml</a></li>
<li><a href="#branches54githubworkflowsjavascripttestsyml">branches/5.4/.github/workflows/javascript-tests.yml</a></li>
<li><a href="#branches54githubworkflowsphpunittestsyml">branches/5.4/.github/workflows/phpunit-tests.yml</a></li>
<li><a href="#branches54gitignore">branches/5.4/.gitignore</a></li>
<li><a href="#branches54dockercomposeyml">branches/5.4/docker-compose.yml</a></li>
<li><a href="#branches54phpcompatxmldist">branches/5.4/phpcompat.xml.dist</a></li>
<li><a href="#branches54phpcsxmldist">branches/5.4/phpcs.xml.dist</a></li>
<li><a href="#branches54testsphpunitincludesabstracttestcasephp">branches/5.4/tests/phpunit/includes/abstract-testcase.php</a></li>
<li><a href="#branches54toolslocalenvscriptsdockerjs">branches/5.4/tools/local-env/scripts/docker.js</a></li>
<li><a href="#branches54toolslocalenvscriptsinstalljs">branches/5.4/tools/local-env/scripts/install.js</a></li>
<li><a href="#branches54toolslocalenvscriptsstartjs">branches/5.4/tools/local-env/scripts/start.js</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>branches/5.4/.cache/</li>
<li><a href="#branches54cachegitkeep">branches/5.4/.cache/.gitkeep</a></li>
<li><a href="#branches54githubworkflowstestbuildprocessesyml">branches/5.4/.github/workflows/test-build-processes.yml</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#branches54githubworkflowstestnpmyml">branches/5.4/.github/workflows/test-npm.yml</a></li>
<li><a href="#branches54githubworkflowswelcomenewcontributorsyml">branches/5.4/.github/workflows/welcome-new-contributors.yml</a></li>
</ul>
<h3>Property Changed</h3>
<ul>
<li><a href="#branches54">branches/5.4/</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<span class="cx" style="display: block; padding: 0 10px">Index: branches/5.4
</span><span class="cx" style="display: block; padding: 0 10px">===================================================================
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">--- branches/5.4 2024-07-01 18:48:38 UTC (rev 58610)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ branches/5.4 2024-07-01 19:17:07 UTC (rev 58611)
</ins><a id="branches54"></a>
<div class="propset"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Property changes: branches/5.4</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: svn:mergeinfo</h4></div>
<span class="cx" style="display: block; padding: 0 10px"> /branches/4.9:43557,43622
</span><span class="cx" style="display: block; padding: 0 10px"> /branches/5.0:43681-43682,43684-43688,43719-43720,43723,43726-43727,43729-43731,43734-43744,43747,43751-43754,43758,43760-43765,43767-43770,43772,43774-43781,43783,43785,43790-43806,43808-43821,43825,43828,43830-43834,43836-43843,43846-43863,43867-43889,43891-43894,43897-43905,43908-43909,43911-43929,43931-43942,43946-43947,43949-43956,43959-43964,43967-43969,43988,43994,44014,44017,44047,44183,44185,44187-44206,44208-44213,44231-44232,44235,44248,44284,44287-44288
</span><span class="cx" style="display: block; padding: 0 10px"> /branches/5.5:49373-49379,49381
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-/trunk:47432,47436,47439,47441,47443-47444,47449,47455-47456,47458-47459,47462,47475-47476,47495,47500,47502,47511,47513,47515,47517,47521,47532,47536-47537,47539,47547,47549,47555,47558,47560,47564,47568,47576,47578,47580,47586,47590-47591,47594,47608-47609,47628,47633-47635,47637-47638,47663-47664,47689,47699,47730,47734,47751,47784,47790,47795-47796,47799,47801,47820,47832,47838,47842,47846,47867,47872-47873,47889,47947-47952,47984,48213,48241,48338,48341,48705,49162,49168-49169,49175,49204,49227-49228,49244,49306,49335,49362,49369,49371,49380,49382-49388,49452,49548,49636,49779,49781-49784,49786,49836,49876,49933,49937-49940,49983,49989,50017,50126,50176,50185,50192,50267-50268,50285,50298-50299,50379,50387,50413,50416,50432,50435-50436,50441-50444,50446,50473-50474,50476,50479,50485-50487,50545,50579,50590,50598,50670,50704,50717,50796,50799,50930,50940-50941,50984-50985,51341,51355
,51426,51498,51511,51535,51559-51560,51740,51810-51813,51828,51883,51921,51924-51925,51937,52002,52040,52130,52183,52233,52412,52454-52457,52844,53112,53581-53582,53592,53736-53737,53940,53947,53958-53960,54039,54096,54108,54293,54313,54322,54342-54343,54373,54511,54521-54530,54541,54649-54651,54674,54750,54852,54968,55152,55350,55487,56015-56016,56833-56836,56838,57388-57389,57931
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/trunk:47432,47436,47439,47441,47443-47444,47449,47455-47456,47458-47459,47462,47475-47476,47495,47500,47502,47511,47513,47515,47517,47521,47532,47536-47537,47539,47547,47549,47555,47558,47560,47564,47568,47576,47578,47580,47586,47590-47591,47594,47608-47609,47628,47633-47635,47637-47638,47663-47664,47689,47699,47730,47734,47751,47784,47790,47795-47796,47799,47801,47820,47832,47838,47842,47846,47867,47872-47873,47889,47947-47952,47984,48213,48241,48338,48341,48705,49162,49168-49169,49175,49204,49227-49228,49244,49264,49306,49335,49362,49369,49371,49380,49382-49388,49452,49548,49636,49779,49781-49784,49786,49836,49876,49933,49937-49940,49983,49989,50017,50126,50176,50185,50192,50267-50268,50285,50298-50299,50379,50387,50413,50416,50432,50435-50436,50441-50444,50446,50473-50474,50476,50479,50485-50487,50545,50579,50590,50598,50670,50704,50717,50796,50799,50930,50940-50941,50984-50985,51341
,51355,51426,51498,51511,51535,51559-51560,51673,51740,51810-51813,51828,51883,51921,51924-51925,51937,52002,52040,52130,52179,52183,52233,52412,52454-52457,52844,53112,53552,53581-53582,53592,53736-53737,53895,53940,53947,53958-53960,54039,54096,54108,54293,54313,54322,54342-54343,54373,54511,54521-54530,54541,54649-54651,54674,54750,54852,54968,55152,55350,55487,56015-56016,56464,56833-56836,56838,57124-57125,57249,57388-57389,57918,57931,58157
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="branches54cachegitkeep"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.4/.cache/.gitkeep</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">Modified: branches/5.4/.github/workflows/coding-standards.yml
===================================================================
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">--- branches/5.4/.github/workflows/coding-standards.yml 2024-07-01 18:48:38 UTC (rev 58610)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ branches/5.4/.github/workflows/coding-standards.yml 2024-07-01 19:17:07 UTC (rev 58611)
</ins><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,112 +40,35 @@
</span><span class="cx" style="display: block; padding: 0 10px"> group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
</span><span class="cx" style="display: block; padding: 0 10px"> cancel-in-progress: true
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# Disable permissions for all available scopes by default.
+# Any needed permissions should be configured at the job level.
+permissions: {}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> jobs:
</span><span class="cx" style="display: block; padding: 0 10px"> # Runs PHP coding standards checks.
</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.
- # - Installs Composer dependencies (use cache if possible).
- # - Make Composer packages available globally.
- # - Logs PHP_CodeSniffer debug information.
- # - Runs PHPCS on the full codebase with warnings suppressed.
- # - Runs PHPCS on the `tests` directory without warnings suppressed.
</del><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
- timeout-minutes: 20
</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
+ permissions:
+ contents: read
</ins><span class="cx" style="display: block; padding: 0 10px"> if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ with:
+ php-version: '7.3'
</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: Checkout repository
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
-
- - name: Set up PHP
- uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0
- with:
- php-version: '7.3'
- coverage: none
- tools: composer, cs2pr
-
- - name: Log debug information
- run: |
- php --version
- composer --version
-
- - name: Install Composer dependencies
- uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
- with:
- composer-options: "--no-progress --no-ansi"
-
- - name: Make Composer packages available globally
- run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
-
- - name: Log PHPCS debug information
- run: phpcs -i
-
- - name: Run PHPCBF on all Core files
- run: phpcbf
-
- - name: Run PHPCS on all Core files
- run: phpcs -q -n --report=checkstyle | cs2pr
-
- - name: Check test suite files for warnings
- run: phpcs tests -q --report=checkstyle | cs2pr
-
</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.
- # - Logs debug information about the GitHub Action runner.
- # - Installs Node.js.
- # - Logs updated debug information.
- # _ Installs npm dependencies.
- # - Run the WordPress JSHint checks.
</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
- timeout-minutes: 20
</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
+ permissions:
+ contents: read
</ins><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_CHROMIUM_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@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
-
- - name: Log debug information
- run: |
- npm --version
- node --version
- git --version
- svn --version
-
- - name: Install Node.js
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
- with:
- node-version-file: '.nvmrc'
- cache: npm
-
- - name: Log debug information
- run: |
- npm --version
- node --version
-
- - name: Install Dependencies
- run: npm ci
-
- - name: Run JSHint
- run: npm run grunt jshint
-
</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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ permissions:
+ actions: read
+ contents: read
</ins><span class="cx" style="display: block; padding: 0 10px"> needs: [ phpcs, jshint ]
</span><span class="cx" style="display: block; padding: 0 10px"> if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
</span><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -159,6 +82,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> failed-workflow:
</span><span class="cx" style="display: block; padding: 0 10px"> name: Failed workflow tasks
</span><span class="cx" style="display: block; padding: 0 10px"> runs-on: ubuntu-latest
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ permissions:
+ actions: write
</ins><span class="cx" style="display: block; padding: 0 10px"> needs: [ phpcs, jshint, slack-notifications ]
</span><span class="cx" style="display: block; padding: 0 10px"> if: |
</span><span class="cx" style="display: block; padding: 0 10px"> always() &&
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -172,7 +97,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> steps:
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Dispatch workflow run
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> retries: 2
</span><span class="cx" style="display: block; padding: 0 10px"> retry-exempt-status-codes: 418
</span></span></pre></div>
<a id="branches54githubworkflowsjavascripttestsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.4/.github/workflows/javascript-tests.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.4/.github/workflows/javascript-tests.yml 2024-07-01 18:48:38 UTC (rev 58610)
+++ branches/5.4/.github/workflows/javascript-tests.yml 2024-07-01 19:17:07 UTC (rev 58611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -38,53 +38,25 @@
</span><span class="cx" style="display: block; padding: 0 10px"> group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
</span><span class="cx" style="display: block; padding: 0 10px"> cancel-in-progress: true
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# Disable permissions for all available scopes by default.
+# Any needed permissions should be configured at the job level.
+permissions: {}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> jobs:
</span><span class="cx" style="display: block; padding: 0 10px"> # Runs the QUnit tests for WordPress.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- #
- # Performs the following steps:
- # - Checks out the repository.
- # - Logs debug information about the GitHub Action runner.
- # - Installs Node.js.
- # - Logs updated debug information.
- # _ Installs npm dependencies.
- # - Run the WordPress QUnit tests.
</del><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
- timeout-minutes: 20
</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
+ permissions:
+ contents: read
</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">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- steps:
- - name: Checkout repository
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
-
- - name: Log debug information
- run: |
- npm --version
- node --version
- git --version
- svn --version
-
- - name: Set up Node.js
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
- with:
- node-version-file: '.nvmrc'
- cache: npm
-
- - name: Log debug information
- run: |
- npm --version
- node --version
-
- - name: Install Dependencies
- run: npm ci
-
- - name: Run QUnit tests
- run: npm run grunt qunit:compiled
-
</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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ permissions:
+ actions: read
+ contents: read
</ins><span class="cx" style="display: block; padding: 0 10px"> needs: [ test-js ]
</span><span class="cx" style="display: block; padding: 0 10px"> if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
</span><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -98,6 +70,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> failed-workflow:
</span><span class="cx" style="display: block; padding: 0 10px"> name: Failed workflow tasks
</span><span class="cx" style="display: block; padding: 0 10px"> runs-on: ubuntu-latest
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ permissions:
+ actions: write
</ins><span class="cx" style="display: block; padding: 0 10px"> needs: [ test-js, slack-notifications ]
</span><span class="cx" style="display: block; padding: 0 10px"> if: |
</span><span class="cx" style="display: block; padding: 0 10px"> always() &&
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -110,7 +84,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> steps:
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Dispatch workflow run
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> retries: 2
</span><span class="cx" style="display: block; padding: 0 10px"> retry-exempt-status-codes: 418
</span></span></pre></div>
<a id="branches54githubworkflowsphpunittestsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.4/.github/workflows/phpunit-tests.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.4/.github/workflows/phpunit-tests.yml 2024-07-01 18:48:38 UTC (rev 58610)
+++ branches/5.4/.github/workflows/phpunit-tests.yml 2024-07-01 19:17:07 UTC (rev 58611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,56 +26,35 @@
</span><span class="cx" style="display: block; padding: 0 10px"> group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
</span><span class="cx" style="display: block; padding: 0 10px"> cancel-in-progress: true
</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_CHROMIUM_DOWNLOAD: ${{ true }}
- # Controls which npm script to use for running PHPUnit tests. Options ar `php` and `php-composer`.
- PHPUNIT_SCRIPT: php
- LOCAL_PHP_MEMCACHED: ${{ false }}
- SLOW_TESTS: 'external-http,media,restapi'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# Disable permissions for all available scopes by default.
+# Any needed permissions should be configured at the job level.
+permissions: {}
</ins><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 PHPUnit tests for WordPress.
- #
- # Performs the following steps:
- # - Sets environment variables.
- # - Sets up the environment variables needed for testing with memcached (if desired).
- # - Installs Node.js.
- # - Installs npm dependencies
- # - Configures caching for Composer.
- # - Installs Composer dependencies.
- # - Logs Docker debug information (about the Docker installation within the runner).
- # - Starts the WordPress Docker container.
- # - Starts the Memcached server after the Docker network has been created (if desired).
- # - Logs general debug information about the runner.
- # - Logs the running Docker containers.
- # - Logs debug information from inside the WordPress Docker container.
- # - Logs debug information about what's installed within the WordPress Docker containers.
- # - Install WordPress within the Docker container.
- # - Run the PHPUnit tests.
- # - Checks out the WordPress Test reporter repository.
- # - Reconnect the directory to the Git repository.
- # - Submit the test results to the WordPress.org host test results.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # Creates PHPUnit test jobs.
</ins><span class="cx" style="display: block; padding: 0 10px"> test-php:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.split_slow && ' slow tests' || '' }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }}
- runs-on: ${{ matrix.os }}
- timeout-minutes: 20
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ name: PHP ${{ matrix.php }}
+ uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v2.yml@trunk
+ permissions:
+ contents: read
+ secrets: inherit
</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="cx" style="display: block; padding: 0 10px"> matrix:
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ os: [ ubuntu-latest ]
</ins><span class="cx" style="display: block; padding: 0 10px"> php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4' ]
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- os: [ ubuntu-latest ]
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ multisite: [ false, true ]
+ split_slow: [ false ]
</ins><span class="cx" style="display: block; padding: 0 10px"> memcached: [ false ]
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- split_slow: [ false ]
- multisite: [ false, true ]
</del><span class="cx" style="display: block; padding: 0 10px"> include:
</span><span class="cx" style="display: block; padding: 0 10px"> # Additional "slow" jobs for PHP 5.6.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - php: '5.6.20'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - php: '5.6'
</ins><span class="cx" style="display: block; padding: 0 10px"> os: ubuntu-latest
</span><span class="cx" style="display: block; padding: 0 10px"> memcached: false
</span><span class="cx" style="display: block; padding: 0 10px"> multisite: false
</span><span class="cx" style="display: block; padding: 0 10px"> split_slow: true
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - php: '5.6.20'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - php: '5.6'
</ins><span class="cx" style="display: block; padding: 0 10px"> os: ubuntu-latest
</span><span class="cx" style="display: block; padding: 0 10px"> memcached: false
</span><span class="cx" style="display: block; padding: 0 10px"> multisite: true
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -85,155 +64,31 @@
</span><span class="cx" style="display: block; padding: 0 10px"> os: ubuntu-latest
</span><span class="cx" style="display: block; padding: 0 10px"> memcached: true
</span><span class="cx" style="display: block; padding: 0 10px"> multisite: false
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ split_slow: false
</ins><span class="cx" style="display: block; padding: 0 10px"> - php: '7.4'
</span><span class="cx" style="display: block; padding: 0 10px"> os: ubuntu-latest
</span><span class="cx" style="display: block; padding: 0 10px"> memcached: true
</span><span class="cx" style="display: block; padding: 0 10px"> multisite: true
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # Report the results of the PHP 7.4 without memcached job.
- - php: '7.4'
- os: ubuntu-latest
- memcached: false
- multisite: false
- report: true
- env:
- LOCAL_PHP: ${{ matrix.php }}-fpm
- LOCAL_PHP_MEMCACHED: ${{ matrix.memcached }}
- PHPUNIT_CONFIG: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ split_slow: false
+ with:
+ os: ${{ matrix.os }}
+ php: ${{ matrix.php }}
+ multisite: ${{ matrix.multisite }}
+ split_slow: ${{ matrix.split_slow }}
+ test_ajax: ${{ ! matrix.multisite }}
+ memcached: ${{ matrix.memcached }}
+ phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
</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@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
-
- - name: Install Node.js
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
- with:
- node-version-file: '.nvmrc'
- cache: npm
-
-
- - name: Install npm dependencies
- run: npm ci
-
- - name: Get Composer cache directory
- id: composer-cache
- run: echo "composer_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
-
- - name: Cache Composer dependencies
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3.2.3
- env:
- cache-name: cache-composer-dependencies
- with:
- path: ${{ steps.composer-cache.outputs.composer_dir }}
- key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
-
- - name: Install Composer dependencies
- run: |
- if [ ${{ env.LOCAL_PHP }} == '7.1-fpm' ]; then
- docker-compose run --rm php composer update
- git checkout -- composer.lock
- elif [[ ${{ env.LOCAL_PHP }} == '5.6.20-fpm' || ${{ env.LOCAL_PHP }} == '5.6-fpm' || ${{ env.LOCAL_PHP }} == '7.0-fpm' ]]; then
- docker-compose run --rm php composer require --dev phpunit/phpunit:"^5.7" --update-with-dependencies
- git checkout -- composer.lock composer.json
- else
- docker-compose run --rm php composer install
- fi
-
- - name: Docker debug information
- run: |
- docker -v
- docker-compose -v
-
- - name: Start Docker environment
- run: |
- npm run env:start
-
- # The memcached server needs to start after the Docker network has been set up with `npm run env:start`.
- - name: Start the Memcached server.
- if: ${{ matrix.memcached }}
- run: |
- cp tests/phpunit/includes/object-cache.php src/wp-content/object-cache.php
- docker run --name memcached --net $(basename "$PWD")_wpdevnet -d memcached
-
- - name: General debug information
- run: |
- npm --version
- node --version
- curl --version
- git --version
- svn --version
-
- - name: Log running Docker containers
- run: docker ps -a
-
- - name: WordPress Docker container debug information
- run: |
- 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: Run slow PHPUnit tests
- if: ${{ matrix.split_slow }}
- run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ${{ env.SLOW_TESTS }}
-
- - name: Run PHPUnit tests for single site excluding slow tests
- if: ${{ matrix.php < '7.0' && ! matrix.split_slow && ! matrix.multisite }}
- run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-required
-
- - name: Run PHPUnit tests for Multisite excluding slow tests
- if: ${{ matrix.php < '7.0' && ! matrix.split_slow && matrix.multisite }}
- run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-excluded,oembed-headers
-
- - name: Run PHPUnit tests
- if: ${{ matrix.php >= '7.0' }}
- run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }}
-
- - name: Run AJAX tests
- if: ${{ ! matrix.split_slow && ! matrix.multisite }}
- run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax
-
- - name: Run ms-files tests as a multisite install
- if: ${{ matrix.multisite && ! matrix.split_slow }}
- run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --group ms-files
-
- - name: Run external HTTP tests
- if: ${{ ! matrix.multisite && ! matrix.split_slow }}
- run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group external-http
-
- # __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist.
- - name: Run (xDebug) tests
- if: ${{ ! matrix.split_slow }}
- run: LOCAL_PHP_XDEBUG=true npm run test:${{ env.PHPUNIT_SCRIPT }} -- -v --group xdebug --exclude-group __fakegroup__
-
- - name: Checkout the WordPress Test Reporter
- if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }}
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- with:
- repository: 'WordPress/phpunit-test-runner'
- path: 'test-runner'
-
- - name: Submit test results to the WordPress.org host test results
- if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.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 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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ permissions:
+ actions: read
+ contents: read
</ins><span class="cx" style="display: block; padding: 0 10px"> needs: [ test-php ]
</span><span class="cx" style="display: block; padding: 0 10px"> if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
</span><span class="cx" style="display: block; padding: 0 10px"> with:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- calling_status: ${{ needs.test-php.result == 'success' && 'success' || needs.test-php.result == 'cancelled' && 'cancelled' || 'failure' }}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
</ins><span class="cx" style="display: block; padding: 0 10px"> secrets:
</span><span class="cx" style="display: block; padding: 0 10px"> SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
</span><span class="cx" style="display: block; padding: 0 10px"> SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -243,7 +98,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> failed-workflow:
</span><span class="cx" style="display: block; padding: 0 10px"> name: Failed workflow tasks
</span><span class="cx" style="display: block; padding: 0 10px"> runs-on: ubuntu-latest
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- needs: [ test-php, slack-notifications ]
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ permissions:
+ actions: write
+ needs: [ slack-notifications ]
</ins><span class="cx" style="display: block; padding: 0 10px"> if: |
</span><span class="cx" style="display: block; padding: 0 10px"> always() &&
</span><span class="cx" style="display: block; padding: 0 10px"> github.repository == 'WordPress/wordpress-develop' &&
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -250,12 +107,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> github.event_name != 'pull_request' &&
</span><span class="cx" style="display: block; padding: 0 10px"> github.run_attempt < 2 &&
</span><span class="cx" style="display: block; padding: 0 10px"> (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- needs.test-php.result == 'cancelled' || needs.test-php.result == 'failure'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ contains( needs.*.result, 'cancelled' ) ||
+ contains( needs.*.result, 'failure' )
</ins><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> steps:
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Dispatch workflow run
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> retries: 2
</span><span class="cx" style="display: block; padding: 0 10px"> retry-exempt-status-codes: 418
</span></span></pre></div>
<a id="branches54githubworkflowstestbuildprocessesymlfromrev58610branches54githubworkflowstestnpmyml"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: branches/5.4/.github/workflows/test-build-processes.yml (from rev 58610, branches/5.4/.github/workflows/test-npm.yml)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.4/.github/workflows/test-build-processes.yml (rev 0)
+++ branches/5.4/.github/workflows/test-build-processes.yml 2024-07-01 19:17:07 UTC (rev 58611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,135 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+name: Test Build Processes
+
+on:
+ push:
+ branches:
+ - trunk
+ - '3.[7-9]'
+ - '[4-9].[0-9]'
+ tags:
+ - '[0-9]+.[0-9]'
+ - '[0-9]+.[0-9].[0-9]+'
+ pull_request:
+ branches:
+ - trunk
+ - '3.[7-9]'
+ - '[4-9].[0-9]'
+ paths:
+ # These files configure npm. Changes could affect the outcome.
+ - 'package*.json'
+ # JavaScript files are built using npm.
+ - '**.js'
+ # CSS and SCSS files are built using npm.
+ - '**.scss'
+ - '**.css'
+ # Changes to workflow files should always verify all workflows are successful.
+ - '.github/workflows/**.yml'
+ workflow_dispatch:
+
+# Cancels all previous workflow runs for pull requests that have not completed.
+concurrency:
+ # The concurrency group contains the workflow name and the branch name for pull requests
+ # or the commit hash for any other events.
+ group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
+ cancel-in-progress: true
+
+# Disable permissions for all available scopes by default.
+# Any needed permissions should be configured at the job level.
+permissions: {}
+
+jobs:
+ # Tests the WordPress Core build process on multiple operating systems.
+ test-core-build-process:
+ name: Core running from ${{ matrix.directory }}
+ uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk
+ permissions:
+ contents: read
+ if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ ubuntu-latest, windows-latest ]
+ directory: [ 'src', 'build' ]
+ include:
+ # Only prepare artifacts once.
+ - os: ubuntu-latest
+ directory: 'build'
+ prepare-playground: true
+ with:
+ os: ${{ matrix.os }}
+ directory: ${{ matrix.directory }}
+ prepare-playground: ${{ matrix.prepare-playground && matrix.prepare-playground || false }}
+ test-emoji: false
+
+ # Tests the WordPress Core build process on MacOS.
+ #
+ # This is separate from the job above in order to use stricter conditions when determining when to run.
+ # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate.
+ #
+ # The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is
+ # currently no way to determine the OS being used on a given job.
+ # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability.
+ test-core-build-process-macos:
+ name: Core running from ${{ matrix.directory }}
+ uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk
+ permissions:
+ contents: read
+ if: ${{ github.repository == 'WordPress/wordpress-develop' }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ macos-13 ]
+ directory: [ 'src', 'build' ]
+ with:
+ os: ${{ matrix.os }}
+ directory: ${{ matrix.directory }}
+ test-emoji: false
+
+ slack-notifications:
+ name: Slack Notifications
+ uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
+ permissions:
+ actions: read
+ contents: read
+ needs: [ test-core-build-process, test-core-build-process-macos ]
+ if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
+ with:
+ calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
+ secrets:
+ SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
+ SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
+ SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
+ SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
+
+ failed-workflow:
+ name: Failed workflow tasks
+ runs-on: ubuntu-latest
+ permissions:
+ actions: write
+ needs: [ slack-notifications ]
+ if: |
+ always() &&
+ github.repository == 'WordPress/wordpress-develop' &&
+ github.event_name != 'pull_request' &&
+ github.run_attempt < 2 &&
+ (
+ contains( needs.*.result, 'cancelled' ) ||
+ contains( needs.*.result, 'failure' )
+ )
+
+ steps:
+ - name: Dispatch workflow run
+ uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
+ with:
+ retries: 2
+ retry-exempt-status-codes: 418
+ script: |
+ github.rest.actions.createWorkflowDispatch({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ workflow_id: 'failed-workflow.yml',
+ ref: 'trunk',
+ inputs: {
+ run_id: '${{ github.run_id }}'
+ }
+ });
</ins></span></pre></div>
<a id="branches54githubworkflowstestnpmyml"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: branches/5.4/.github/workflows/test-npm.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.4/.github/workflows/test-npm.yml 2024-07-01 18:48:38 UTC (rev 58610)
+++ branches/5.4/.github/workflows/test-npm.yml 2024-07-01 19:17:07 UTC (rev 58611)
</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">-name: Test npm
-
-on:
- push:
- branches:
- - trunk
- - '3.[7-9]'
- - '[4-9].[0-9]'
- tags:
- - '[0-9]+.[0-9]'
- - '[0-9]+.[0-9].[0-9]+'
- pull_request:
- branches:
- - trunk
- - '3.[7-9]'
- - '[4-9].[0-9]'
- paths:
- # These files configure npm. Changes could affect the outcome.
- - 'package*.json'
- # JavaScript files are built using npm.
- - '**.js'
- # CSS and SCSS files are built using npm.
- - '**.scss'
- - '**.css'
- # Changes to workflow files should always verify all workflows are successful.
- - '.github/workflows/**.yml'
- workflow_dispatch:
-
-# Cancels all previous workflow runs for pull requests that have not completed.
-concurrency:
- # The concurrency group contains the workflow name and the branch name for pull requests
- # or the commit hash for any other events.
- group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
- cancel-in-progress: true
-
-env:
- PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
-
-jobs:
- # Verifies that installing npm dependencies and building WordPress works as expected.
- #
- # Performs the following steps:
- # - Checks out the repository.
- # - Logs debug information about the GitHub Action runner.
- # - Installs Node.js.
- # _ Installs npm dependencies.
- # - Builds WordPress to run from the `build` directory.
- # - Cleans up after building WordPress to the `build` directory.
- # - Builds WordPress to run from the `src` directory.
- # - Cleans up after building WordPress to the `src` directory.
- test-npm:
- name: Test npm on ${{ matrix.os }}
- runs-on: ${{ matrix.os }}
- timeout-minutes: 20
- if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
- strategy:
- fail-fast: false
- matrix:
- os: [ ubuntu-latest, windows-latest ]
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
-
- - name: Log debug information
- run: |
- npm --version
- node --version
- curl --version
- git --version
- svn --version
-
- - name: Install Node.js
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
- with:
- node-version-file: '.nvmrc'
- cache: npm
-
- - name: Install Dependencies
- run: npm ci
-
- - name: Build WordPress
- run: npm run build
-
- - name: Clean after building
- run: npm run grunt clean
-
- - name: Build WordPress in /src
- run: npm run build:dev
-
- - name: Clean after building in /src
- run: npm run grunt clean -- --dev
-
- # Verifies that installing npm dependencies and building WordPress works as expected on MacOS.
- #
- # This is separate from the job above in order to use stricter conditions about when to run.
- # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate.
- #
- # The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is
- # currently no way to determine the OS being used on a given job.
- # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability.
- #
- # Performs the following steps:
- # - Checks out the repository.
- # - Logs debug information about the GitHub Action runner.
- # - Installs Node.js.
- # _ Installs npm dependencies.
- # - Builds WordPress to run from the `build` directory.
- # - Cleans up after building WordPress to the `build` directory.
- # - Builds WordPress to run from the `src` directory.
- # - Cleans up after building WordPress to the `src` directory.
- test-npm-macos:
- name: Test npm on MacOS
- runs-on: macos-latest
- timeout-minutes: 30
- if: ${{ github.repository == 'WordPress/wordpress-develop' }}
- steps:
- - name: Checkout repository
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
-
- - name: Log debug information
- run: |
- npm --version
- node --version
- curl --version
- git --version
- svn --version
-
- - name: Install Node.js
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
- with:
- node-version-file: '.nvmrc'
- cache: npm
-
- - name: Install Dependencies
- run: npm ci
-
- - name: Build WordPress
- run: npm run build
-
- - name: Clean after building
- run: npm run grunt clean
-
- - name: Build WordPress in /src
- run: npm run build:dev
-
- - name: Clean after building in /src
- run: npm run grunt clean -- --dev
-
- slack-notifications:
- name: Slack Notifications
- uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
- needs: [ test-npm, test-npm-macos ]
- if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
- with:
- calling_status: ${{ needs.test-npm.result == 'success' && needs.test-npm-macos.result == 'success' && 'success' || ( needs.test-npm.result == 'cancelled' || needs.test-npm-macos.result == 'cancelled' ) && 'cancelled' || 'failure' }}
- secrets:
- SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
- SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
- SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
- SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
-
- failed-workflow:
- name: Failed workflow tasks
- runs-on: ubuntu-latest
- needs: [ test-npm, test-npm-macos, slack-notifications ]
- if: |
- always() &&
- github.repository == 'WordPress/wordpress-develop' &&
- github.event_name != 'pull_request' &&
- github.run_attempt < 2 &&
- (
- needs.test-npm.result == 'cancelled' || needs.test-npm.result == 'failure' ||
- needs.test-npm-macos.result == 'cancelled' || needs.test-npm-macos.result == 'failure'
- )
-
- steps:
- - name: Dispatch workflow run
- uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
- with:
- retries: 2
- retry-exempt-status-codes: 418
- script: |
- github.rest.actions.createWorkflowDispatch({
- owner: context.repo.owner,
- repo: context.repo.repo,
- workflow_id: 'failed-workflow.yml',
- ref: 'trunk',
- inputs: {
- run_id: '${{ github.run_id }}'
- }
- });
</del></span></pre></div>
<a id="branches54githubworkflowswelcomenewcontributorsyml"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: branches/5.4/.github/workflows/welcome-new-contributors.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.4/.github/workflows/welcome-new-contributors.yml 2024-07-01 18:48:38 UTC (rev 58610)
+++ branches/5.4/.github/workflows/welcome-new-contributors.yml 2024-07-01 19:17:07 UTC (rev 58611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,59 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-name: Welcome New Contributors
-
-on:
- pull_request_target:
- types: [ opened ]
-
-jobs:
- # Comments on a pull request when the author is a new contributor.
- post-welcome-message:
- runs-on: ubuntu-latest
- timeout-minutes: 5
- if: ${{ github.repository == 'WordPress/wordpress-develop' }}
-
- steps:
- - uses: wow-actions/welcome@72817eb31cda1de60f51893d80e2e82ce57f7e76 # v1.3.0
- with:
- FIRST_PR_COMMENT: >
- Hi @{{ author }}! 👋
-
-
- Thank you for your contribution to WordPress! 💖
-
-
- It looks like this is your first pull request to `wordpress-develop`. Here are a few things to be aware of that may help you out!
-
-
- **No one monitors this repository for new pull requests.** Pull requests **must** be attached to a Trac ticket to be considered for inclusion in WordPress Core. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description.
-
-
- **Pull requests are never merged on GitHub.** The WordPress codebase continues to be managed through the SVN repository that this GitHub repository mirrors. Please feel free to open pull requests to work on any contribution you are making.
-
-
- More information about how GitHub pull requests can be used to contribute to WordPress can be found in [this blog post](https://make.wordpress.org/core/2020/02/21/working-on-trac-tickets-using-github-pull-requests/).
-
-
- **Please include automated tests.** Including tests in your pull request is one way to help your patch be considered faster. To learn about WordPress' test suites, visit the [Automated Testing](https://make.wordpress.org/core/handbook/testing/automated-testing/) page in the handbook.
-
-
- If you have not had a chance, please review the [Contribute with Code page](https://make.wordpress.org/core/handbook/contribute/) in the [WordPress Core Handbook](https://make.wordpress.org/core/handbook/).
-
-
- The [Developer Hub](https://developer.wordpress.org/) also documents the various [coding standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/) that are followed:
-
- - [PHP Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/)
-
- - [CSS Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/)
-
- - [HTML Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/html/)
-
- - [JavaScript Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/javascript/)
-
- - [Accessibility Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/accessibility/)
-
- - [Inline Documentation Standards](https://developer.wordpress.org/coding-standards/inline-documentation-standards/)
-
-
- Thank you,
-
- The WordPress Project
</del></span></pre></div>
<a id="branches54gitignore"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.4/.gitignore</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.4/.gitignore 2024-07-01 18:48:38 UTC (rev 58610)
+++ branches/5.4/.gitignore 2024-07-01 19:17:07 UTC (rev 58611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,6 +9,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /phpunit.xml
</span><span class="cx" style="display: block; padding: 0 10px"> /.phpcs.xml
</span><span class="cx" style="display: block; padding: 0 10px"> /phpcs.xml
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.cache/*
</ins><span class="cx" style="display: block; padding: 0 10px"> /tests/phpunit/data/plugins/wordpress-importer
</span><span class="cx" style="display: block; padding: 0 10px"> /tests/phpunit/data/.trac-ticket-cache*
</span><span class="cx" style="display: block; padding: 0 10px"> /tests/qunit/compiled.html
</span></span></pre></div>
<a id="branches54dockercomposeyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.4/docker-compose.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.4/docker-compose.yml 2024-07-01 18:48:38 UTC (rev 58610)
+++ branches/5.4/docker-compose.yml 2024-07-01 19:17:07 UTC (rev 58611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,5 +1,3 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-version: '3.7'
-
</del><span class="cx" style="display: block; padding: 0 10px"> services:
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> ##
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,11 +19,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - ./tools/local-env/default.template:/etc/nginx/conf.d/default.template
</span><span class="cx" style="display: block; padding: 0 10px"> - ./:/var/www
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # Load our config file, substituning environment variables into the config.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # Load our config file, substituting environment variables into the config.
</ins><span class="cx" style="display: block; padding: 0 10px"> command: /bin/sh -c "envsubst '$$LOCAL_DIR' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> depends_on:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ php:
+ condition: service_started
+ mysql:
+ condition: service_healthy
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> ##
</span><span class="cx" style="display: block; padding: 0 10px"> # The PHP container.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -37,23 +38,33 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - wpdevnet
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> environment:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
- LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false}
- PHP_FPM_UID: ${PHP_FPM_UID-1000}
- PHP_FPM_GID: ${PHP_FPM_GID-1000}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - LOCAL_PHP_XDEBUG=${LOCAL_PHP_XDEBUG-false}
+ - XDEBUG_MODE=${LOCAL_PHP_XDEBUG_MODE-develop,debug}
+ - LOCAL_PHP_MEMCACHED=${LOCAL_PHP_MEMCACHED-false}
+ - PHP_FPM_UID=${PHP_FPM_UID-1000}
+ - PHP_FPM_GID=${PHP_FPM_GID-1000}
+ - GITHUB_REF=${GITHUB_REF-false}
+ - GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME-false}
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> volumes:
</span><span class="cx" style="display: block; padding: 0 10px"> - ./tools/local-env/php-config.ini:/usr/local/etc/php/conf.d/php-config.ini
</span><span class="cx" style="display: block; padding: 0 10px"> - ./:/var/www
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- depends_on:
- - mysql
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # Copy or delete the Memcached dropin plugin file as appropriate.
+ command: /bin/sh -c "if [ $LOCAL_PHP_MEMCACHED = true ]; then cp -n /var/www/tests/phpunit/includes/object-cache.php /var/www/src/wp-content/object-cache.php; else rm -f /var/www/src/wp-content/object-cache.php; fi && exec php-fpm"
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly.
+ init: true
+
+ extra_hosts:
+ - localhost:host-gateway
+
</ins><span class="cx" style="display: block; padding: 0 10px"> ##
</span><span class="cx" style="display: block; padding: 0 10px"> # The MySQL container.
</span><span class="cx" style="display: block; padding: 0 10px"> ##
</span><span class="cx" style="display: block; padding: 0 10px"> mysql:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- image: amd64/${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest}
+ platform: linux/amd64
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> networks:
</span><span class="cx" style="display: block; padding: 0 10px"> - wpdevnet
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -71,6 +82,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # For compatibility with PHP versions that don't support the caching_sha2_password auth plugin used in MySQL 8.0.
</span><span class="cx" style="display: block; padding: 0 10px"> command: --default-authentication-plugin=mysql_native_password
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ healthcheck:
+ test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" ]; then mariadb-admin ping -h localhost; else mysqladmin ping -h localhost; fi" ]
+ timeout: 5s
+ interval: 5s
+ retries: 10
+
</ins><span class="cx" style="display: block; padding: 0 10px"> ##
</span><span class="cx" style="display: block; padding: 0 10px"> # The WP CLI container.
</span><span class="cx" style="display: block; padding: 0 10px"> ##
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -81,10 +98,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - wpdevnet
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> environment:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
- LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false}
- PHP_FPM_UID: ${PHP_FPM_UID-1000}
- PHP_FPM_GID: ${PHP_FPM_GID-1000}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - LOCAL_PHP_XDEBUG=${LOCAL_PHP_XDEBUG-false}
+ - LOCAL_PHP_MEMCACHED=${LOCAL_PHP_MEMCACHED-false}
+ - PHP_FPM_UID=${PHP_FPM_UID-1000}
+ - PHP_FPM_GID=${PHP_FPM_GID-1000}
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> volumes:
</span><span class="cx" style="display: block; padding: 0 10px"> - ./:/var/www
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -92,6 +109,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly.
</span><span class="cx" style="display: block; padding: 0 10px"> init: true
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ extra_hosts:
+ - localhost:host-gateway
+
+ depends_on:
+ php:
+ condition: service_started
+ mysql:
+ condition: service_healthy
+
</ins><span class="cx" style="display: block; padding: 0 10px"> ##
</span><span class="cx" style="display: block; padding: 0 10px"> # The PHPUnit container.
</span><span class="cx" style="display: block; padding: 0 10px"> ##
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -102,14 +128,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - wpdevnet
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> environment:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
- LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false}
- LOCAL_DIR: ${LOCAL_DIR-src}
- WP_MULTISITE: ${WP_MULTISITE-false}
- PHP_FPM_UID: ${PHP_FPM_UID-1000}
- PHP_FPM_GID: ${PHP_FPM_GID-1000}
- TRAVIS_BRANCH: ${TRAVIS_BRANCH-false}
- TRAVIS_PULL_REQUEST: ${TRAVIS_PULL_REQUEST-false}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - LOCAL_PHP_XDEBUG=${LOCAL_PHP_XDEBUG-false}
+ - LOCAL_PHP_MEMCACHED=${LOCAL_PHP_MEMCACHED-false}
+ - PHP_FPM_UID=${PHP_FPM_UID-1000}
+ - PHP_FPM_GID=${PHP_FPM_GID-1000}
+ - LOCAL_DIR=${LOCAL_DIR-src}
+ - WP_MULTISITE=${WP_MULTISITE-false}
+ - GITHUB_REF=${GITHUB_REF-false}
+ - GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME-false}
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> volumes:
</span><span class="cx" style="display: block; padding: 0 10px"> - ./tools/local-env/phpunit-config.ini:/usr/local/etc/php/conf.d/phpunit-config.ini
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -120,8 +146,27 @@
</span><span class="cx" style="display: block; padding: 0 10px"> init: true
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> depends_on:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - mysql
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ php:
+ condition: service_started
+ mysql:
+ condition: service_healthy
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ##
+ # The Memcached container.
+ ##
+ memcached:
+ image: memcached
+
+ networks:
+ - wpdevnet
+
+ ports:
+ - 11211:11211
+
+ depends_on:
+ php:
+ condition: service_started
+
</ins><span class="cx" style="display: block; padding: 0 10px"> volumes:
</span><span class="cx" style="display: block; padding: 0 10px"> # So that sites aren't wiped every time containers are restarted, MySQL uses a persistent volume.
</span><span class="cx" style="display: block; padding: 0 10px"> mysql: {}
</span></span></pre></div>
<a id="branches54phpcompatxmldist"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.4/phpcompat.xml.dist</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.4/phpcompat.xml.dist 2024-07-01 18:48:38 UTC (rev 58610)
+++ branches/5.4/phpcompat.xml.dist 2024-07-01 19:17:07 UTC (rev 58611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -11,7 +11,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <arg name="extensions" value="php"/>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. -->
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <arg name="cache"/>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <arg name="cache" value=".cache/phpcompat.json"/>
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <!-- Set the memory limit to 256M.
</span><span class="cx" style="display: block; padding: 0 10px"> For most standard PHP configurations, this means the memory limit will temporarily be raised.
</span></span></pre></div>
<a id="branches54phpcsxmldist"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.4/phpcs.xml.dist</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.4/phpcs.xml.dist 2024-07-01 18:48:38 UTC (rev 58610)
+++ branches/5.4/phpcs.xml.dist 2024-07-01 19:17:07 UTC (rev 58611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6,7 +6,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <arg name="extensions" value="php"/>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. -->
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <arg name="cache"/>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <arg name="cache" value=".cache/phpcs.json"/>
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <!-- Set the memory limit to 256M.
</span><span class="cx" style="display: block; padding: 0 10px"> For most standard PHP configurations, this means the memory limit will temporarily be raised.
</span></span></pre></div>
<a id="branches54testsphpunitincludesabstracttestcasephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.4/tests/phpunit/includes/abstract-testcase.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.4/tests/phpunit/includes/abstract-testcase.php 2024-07-01 18:48:38 UTC (rev 58610)
+++ branches/5.4/tests/phpunit/includes/abstract-testcase.php 2024-07-01 19:17:07 UTC (rev 58611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -180,22 +180,23 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Allow tests to be skipped on some automated runs.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Allows tests to be skipped on some automated runs.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * For test runs on Travis for something other than trunk/master
- * we want to skip tests that only need to run for master.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * For test runs on GitHub Actions for something other than trunk,
+ * we want to skip tests that only need to run for trunk.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function skipOnAutomatedBranches() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
- $travis_branch = getenv( 'TRAVIS_BRANCH' );
- $travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
+ $github_event_name = getenv( 'GITHUB_EVENT_NAME' );
+ $github_ref = getenv( 'GITHUB_REF' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $travis_branch || ! $travis_pull_request ) {
- return;
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $github_event_name ) {
+ // We're on GitHub Actions.
+ $skipped = array( 'pull_request', 'pull_request_target' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'master' !== $travis_branch || 'false' !== $travis_pull_request ) {
- $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( in_array( $github_event_name, $skipped, true ) || 'refs/heads/trunk' !== $github_ref ) {
+ $this->markTestSkipped( 'For automated test runs, this test is only run on trunk' );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="branches54toolslocalenvscriptsdockerjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.4/tools/local-env/scripts/docker.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.4/tools/local-env/scripts/docker.js 2024-07-01 18:48:38 UTC (rev 58610)
+++ branches/5.4/tools/local-env/scripts/docker.js 2024-07-01 19:17:07 UTC (rev 58611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4,5 +4,5 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> dotenvExpand( dotenv.config() );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-// Execute any docker-compose command passed to this script.
-execSync( 'docker-compose ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+// Execute any docker compose command passed to this script.
+execSync( 'docker compose ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } );
</ins></span></pre></div>
<a id="branches54toolslocalenvscriptsinstalljs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.4/tools/local-env/scripts/install.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.4/tools/local-env/scripts/install.js 2024-07-01 18:48:38 UTC (rev 58610)
+++ branches/5.4/tools/local-env/scripts/install.js 2024-07-01 19:17:07 UTC (rev 58611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,7 +44,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {string} cmd The WP-CLI command to run.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_cli( cmd ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- execSync( `docker-compose run --rm cli ${cmd}`, { stdio: 'inherit' } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ execSync( `docker compose run --rm cli ${cmd}`, { stdio: 'inherit' } );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -53,5 +53,5 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function install_wp_importer() {
</span><span class="cx" style="display: block; padding: 0 10px"> const test_plugin_directory = 'tests/phpunit/data/plugins/wordpress-importer';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- execSync( `docker-compose exec -T php rm -rf ${test_plugin_directory} && svn checkout -r ${process.env.WP_IMPORTER_REVISION} https://plugins.svn.wordpress.org/wordpress-importer/trunk/ ${test_plugin_directory}`, { stdio: 'inherit' } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ execSync( `docker compose exec -T php rm -rf ${test_plugin_directory} && svn checkout -r ${process.env.WP_IMPORTER_REVISION} https://plugins.svn.wordpress.org/wordpress-importer/trunk/ ${test_plugin_directory}`, { stdio: 'inherit' } );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="branches54toolslocalenvscriptsstartjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.4/tools/local-env/scripts/start.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.4/tools/local-env/scripts/start.js 2024-07-01 18:48:38 UTC (rev 58610)
+++ branches/5.4/tools/local-env/scripts/start.js 2024-07-01 19:17:07 UTC (rev 58611)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5,7 +5,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> dotenvExpand( dotenv.config() );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Start the local-env containers.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-execSync( 'docker-compose up -d wordpress-develop', { stdio: 'inherit' } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+const containers = ( process.env.LOCAL_PHP_MEMCACHED === 'true' )
+ ? 'wordpress-develop memcached'
+ : 'wordpress-develop';
+execSync( `docker compose up -d ${containers}`, { stdio: 'inherit' } );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If Docker Toolbox is being used, we need to manually forward LOCAL_PORT to the Docker VM.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( process.env.DOCKER_TOOLBOX_INSTALL_PATH ) {
</span></span></pre>
</div>
</div>
</body>
</html>