<!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>[53598] branches/5.7/.github/workflows: Build/Test Tools: Use the Slack notifications workflow as a reusable one.</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/53598">53598</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/53598","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>2022-06-30 16:34:14 +0000 (Thu, 30 Jun 2022)</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: Use the Slack notifications workflow as a reusable one.
This backports several changesets that are required to remove the reliance on the `workflow_run` event for posting Slack notifications.
The Slack notification workflow will now be called as a reusable one, which has several benefits (see <a href="https://core.trac.wordpress.org/changeset/53591">[53591]</a>).
Several other minor GitHub Actions related updates are also being backported in this commit to maintain tooling consistency across branches that still receive security updates as a courtesy when necessary.
Merges <a href="https://core.trac.wordpress.org/changeset/50446">[50446]</a>, <a href="https://core.trac.wordpress.org/changeset/50473">[50473]</a>, <a href="https://core.trac.wordpress.org/changeset/50704">[50704]</a>, <a href="https://core.trac.wordpress.org/changeset/50796">[50796]</a>, <a href="https://core.trac.wordpress.org/changeset/50930">[50930]</a>, <a href="https://core.trac.wordpress.org/changeset/51341">[51341]</a>, <a href="https://core.trac.wordpress.org/changeset/51355">[51355]</a>, <a href="https://core.trac.wordpress.org/changeset/51498">[51498]</a>, <a href="https://core.trac.wordpress.org/changeset/51511">[51511]</a>, <a href="https://core.trac.wordpress.org/changeset/51535">[51535]</a>, <a href="https://core.trac.wordpress.org/changeset/51924">[51924]</a>, <a href="https://core.trac.wordpress.org/changeset/51925">[51925]</a>, <a href="https://core.trac.wordpress.org/changeset/51937">[51937]</a>, <a href="https://core.trac.wordpress.org/changeset/52002">[52002]</a
>, <a href="https://core.trac.wordpress.org/changeset/52130">[52130]</a>, <a href="https://core.trac.wordpress.org/changeset/52183">[52183]</a>, <a href="https://core.trac.wordpress.org/changeset/52233">[52233]</a>, <a href="https://core.trac.wordpress.org/changeset/53112">[53112]</a>, <a href="https://core.trac.wordpress.org/changeset/53581">[53581]</a>, <a href="https://core.trac.wordpress.org/changeset/53582">[53582]</a>, <a href="https://core.trac.wordpress.org/changeset/53592">[53592]</a> to the 5.7 branch.
See <a href="https://core.trac.wordpress.org/ticket/56095">#56095</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branches57githubworkflowscodingstandardsyml">branches/5.7/.github/workflows/coding-standards.yml</a></li>
<li><a href="#branches57githubworkflowsendtoendtestsyml">branches/5.7/.github/workflows/end-to-end-tests.yml</a></li>
<li><a href="#branches57githubworkflowsjavascripttestsyml">branches/5.7/.github/workflows/javascript-tests.yml</a></li>
<li><a href="#branches57githubworkflowsphpcompatibilityyml">branches/5.7/.github/workflows/php-compatibility.yml</a></li>
<li><a href="#branches57githubworkflowsphpunittestsyml">branches/5.7/.github/workflows/phpunit-tests.yml</a></li>
<li><a href="#branches57githubworkflowstestnpmyml">branches/5.7/.github/workflows/test-npm.yml</a></li>
<li><a href="#branches57githubworkflowswelcomenewcontributorsyml">branches/5.7/.github/workflows/welcome-new-contributors.yml</a></li>
</ul>
<h3>Property Changed</h3>
<ul>
<li><a href="#branches57">branches/5.7/</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<span class="cx" style="display: block; padding: 0 10px">Index: branches/5.7
</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.7 2022-06-30 16:26:30 UTC (rev 53597)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ branches/5.7 2022-06-30 16:34:14 UTC (rev 53598)
</ins><a id="branches57"></a>
<div class="propset"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Property changes: branches/5.7</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/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><span class="cx" style="display: block; padding: 0 10px"> /branches/5.8:51889
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-/trunk:50428-50430,50432,50435-50436,50439,50441-50445,50460-50461,50465-50466,50471,50475,50478-50479,50483,50485-50487,50493,50495,50499,50501,50507,50510,50518,50523,50525,50534-50535,50545,50551-50552,50566-50569,50571,50575,50577,50579,50585-50586,50590-50598,50628,50634,50653-50654,50659,50663,50667,50669-50670,50682-50683,50687,50708,50710,50714,50717,50799,50938,50940-50941,50954,51002,51035,51169,51426,51559-51560,51740,51810-51813,51828,51883,51890,52454-52457,52844
</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:50428-50430,50432,50435-50436,50439,50441-50446,50460-50461,50465-50466,50471,50473,50475,50478-50479,50483,50485-50487,50493,50495,50499,50501,50507,50510,50518,50523,50525,50534-50535,50545,50551-50552,50566-50569,50571,50575,50577,50579,50585-50586,50590-50598,50628,50634,50653-50654,50659,50663,50667,50669-50670,50682-50683,50687,50704,50708,50710,50714,50717,50796,50799,50930,50938,50940-50941,50954,51002,51035,51169,51341,51355,51426,51498,51511,51535,51559-51560,51740,51810-51813,51828,51883,51890,51921,51924-51925,51937,52002,52130,52183,52233,52454-52457,52844,53112,53581-53582,53592
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="branches57githubworkflowscodingstandardsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/.github/workflows/coding-standards.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/.github/workflows/coding-standards.yml 2022-06-30 16:26:30 UTC (rev 53597)
+++ branches/5.7/.github/workflows/coding-standards.yml 2022-06-30 16:34:14 UTC (rev 53598)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5,7 +5,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # PHPCS checking was introduced in WordPress 5.1.
</span><span class="cx" style="display: block; padding: 0 10px"> push:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - master
</del><span class="cx" style="display: block; padding: 0 10px"> - trunk
</span><span class="cx" style="display: block; padding: 0 10px"> - '3.[89]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]'
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -14,7 +13,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]*'
</span><span class="cx" style="display: block; padding: 0 10px"> pull_request:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - master
</del><span class="cx" style="display: block; padding: 0 10px"> - trunk
</span><span class="cx" style="display: block; padding: 0 10px"> - '3.[89]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]'
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,6 +32,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - '.github/workflows/*.yml'
</span><span class="cx" style="display: block; padding: 0 10px"> workflow_dispatch:
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# 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
+
</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><span class="cx" style="display: block; padding: 0 10px"> #
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -48,18 +53,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # - Logs PHP_CodeSniffer debug information.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Runs PHPCS on the full codebase with warnings suppressed.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Runs PHPCS on the `tests` directory without warnings suppressed.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - todo: Configure Slack notifications for failing scans.
</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><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">+ timeout-minutes: 20
</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><span class="cx" style="display: block; padding: 0 10px"> steps:
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Checkout repository
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Set up PHP
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: shivammathur/setup-php@afefcaf556d98dc7896cca380e181decb609ca44 # v2.10.0
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: shivammathur/setup-php@3eda58347216592f618bb1dff277810b6698e4ca # v2.19.1
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> php-version: '7.4'
</span><span class="cx" style="display: block; padding: 0 10px"> coverage: none
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -71,7 +76,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> composer --version
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install Composer dependencies
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: ramsey/composer-install@92a7904348d4ad30236f3611e33b7f0c6f9edd70 # v1.1.0
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: ramsey/composer-install@f680dac46551dffb2234a240d65ae806c2999dd6 # v2.1.0
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> composer-options: "--no-progress --no-ansi --no-interaction"
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -93,16 +98,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> #
</span><span class="cx" style="display: block; padding: 0 10px"> # Performs the following steps:
</span><span class="cx" style="display: block; padding: 0 10px"> # - Checks out the repository.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - Logs debug information about the runner container.
- # - Installs NodeJS 14.
- # - Sets up caching for NPM.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # - Logs debug information about the GitHub Action runner.
+ # - Installs NodeJS.
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Logs updated debug information.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # _ Installs NPM dependencies.
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Run the WordPress JSHint checks.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - todo: Configure Slack notifications for failing tests.
</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><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">+ timeout-minutes: 20
</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"> env:
</span><span class="cx" style="display: block; padding: 0 10px"> PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -109,7 +113,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: Checkout repository
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Log debug information
</span><span class="cx" style="display: block; padding: 0 10px"> run: |
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -119,19 +123,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> svn --version
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install NodeJS
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- node-version: 14
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ node-version-file: '.nvmrc'
+ cache: npm
</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: Cache NodeJS modules
- uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
- env:
- cache-name: cache-node-modules
- with:
- # npm cache files are stored in `~/.npm` on Linux/macOS
- path: ~/.npm
- key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
-
</del><span class="cx" style="display: block; padding: 0 10px"> - name: Log debug information
</span><span class="cx" style="display: block; padding: 0 10px"> run: |
</span><span class="cx" style="display: block; padding: 0 10px"> npm --version
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -142,3 +138,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Run JSHint
</span><span class="cx" style="display: block; padding: 0 10px"> run: npm run grunt jshint
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ slack-notifications:
+ name: Slack Notifications
+ uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
+ needs: [ phpcs, jshint ]
+ if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
+ with:
+ calling_status: ${{ needs.phpcs.result == 'success' && needs.jshint.result == 'success' && 'success' || ( needs.phpcs.result == 'cancelled' || needs.jshint.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 }}
</ins></span></pre></div>
<a id="branches57githubworkflowsendtoendtestsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/.github/workflows/end-to-end-tests.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/.github/workflows/end-to-end-tests.yml 2022-06-30 16:26:30 UTC (rev 53597)
+++ branches/5.7/.github/workflows/end-to-end-tests.yml 2022-06-30 16:34:14 UTC (rev 53598)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,10 +1,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> name: End-to-end Tests
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> on:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # The end to end test suite was introduced in WordPress 5.3.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # The end-to-end test suite was introduced in WordPress 5.3.
</ins><span class="cx" style="display: block; padding: 0 10px"> push:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - master
</del><span class="cx" style="display: block; padding: 0 10px"> - trunk
</span><span class="cx" style="display: block; padding: 0 10px"> - '5.[3-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[6-9].[0-9]'
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,12 +12,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - '[6-9].[0-9]*'
</span><span class="cx" style="display: block; padding: 0 10px"> pull_request:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - master
</del><span class="cx" style="display: block; padding: 0 10px"> - trunk
</span><span class="cx" style="display: block; padding: 0 10px"> - '5.[3-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[6-9].[0-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> workflow_dispatch:
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# 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
+
</ins><span class="cx" style="display: block; padding: 0 10px"> env:
</span><span class="cx" style="display: block; padding: 0 10px"> LOCAL_DIR: build
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,13 +31,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # Runs the end-to-end test suite.
</span><span class="cx" style="display: block; padding: 0 10px"> #
</span><span class="cx" style="display: block; padding: 0 10px"> # Performs the following steps:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - Cancels all previous workflow runs for pull requests that have not completed.
- # - Set environment variables.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # - Sets environment variables.
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Checks out the repository.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - Logs debug information about the runner container.
- # - Installs NodeJS 14.
- # - Sets up caching for NPM.
- # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # - Logs debug information about the GitHub Action runner.
+ # - Installs NodeJS.
+ # _ Installs NPM dependencies.
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Builds WordPress to run from the `build` directory.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Starts the WordPress Docker container.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Logs general debug information.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,17 +43,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container).
</span><span class="cx" style="display: block; padding: 0 10px"> # - Install WordPress within the Docker container.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Run the E2E tests.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - todo: Configure Slack notifications for failing tests.
</del><span class="cx" style="display: block; padding: 0 10px"> e2e-tests:
</span><span class="cx" style="display: block; padding: 0 10px"> name: E2E Tests
</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">+ timeout-minutes: 20
</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><span class="cx" style="display: block; padding: 0 10px"> steps:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - name: Cancel previous runs of this workflow (pull requests only)
- if: ${{ github.event_name == 'pull_request' }}
- uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # v0.8.0
-
</del><span class="cx" style="display: block; padding: 0 10px"> - name: Configure environment variables
</span><span class="cx" style="display: block; padding: 0 10px"> run: |
</span><span class="cx" style="display: block; padding: 0 10px"> echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -57,7 +56,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Checkout repository
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Log debug information
</span><span class="cx" style="display: block; padding: 0 10px"> run: |
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -71,19 +70,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> locale -a
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install NodeJS
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- node-version: 14
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ node-version-file: '.nvmrc'
+ cache: npm
</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: Cache NodeJS modules
- uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
- env:
- cache-name: cache-node-modules
- with:
- # npm cache files are stored in `~/.npm` on Linux/macOS
- path: ~/.npm
- key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
-
</del><span class="cx" style="display: block; padding: 0 10px"> - name: Install Dependencies
</span><span class="cx" style="display: block; padding: 0 10px"> run: npm ci
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -120,3 +111,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Run E2E tests
</span><span class="cx" style="display: block; padding: 0 10px"> run: npm run test:e2e
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ slack-notifications:
+ name: Slack Notifications
+ uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
+ needs: [ e2e-tests ]
+ if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
+ with:
+ calling_status: ${{ needs.e2e-tests.result == 'success' && 'success' || needs.e2e-tests.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 }}
</ins></span></pre></div>
<a id="branches57githubworkflowsjavascripttestsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/.github/workflows/javascript-tests.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/.github/workflows/javascript-tests.yml 2022-06-30 16:26:30 UTC (rev 53597)
+++ branches/5.7/.github/workflows/javascript-tests.yml 2022-06-30 16:34:14 UTC (rev 53598)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4,7 +4,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # JavaScript testing was introduced in WordPress 3.8.
</span><span class="cx" style="display: block; padding: 0 10px"> push:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - master
</del><span class="cx" style="display: block; padding: 0 10px"> - trunk
</span><span class="cx" style="display: block; padding: 0 10px"> - '3.[89]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]'
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,7 +12,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]*'
</span><span class="cx" style="display: block; padding: 0 10px"> pull_request:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - master
</del><span class="cx" style="display: block; padding: 0 10px"> - trunk
</span><span class="cx" style="display: block; padding: 0 10px"> - '3.[89]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]'
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -32,31 +30,32 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - '.github/workflows/*.yml'
</span><span class="cx" style="display: block; padding: 0 10px"> workflow_dispatch:
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# 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
+
</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><span class="cx" style="display: block; padding: 0 10px"> #
</span><span class="cx" style="display: block; padding: 0 10px"> # Performs the following steps:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - Cancels all previous workflow runs for pull requests that have not completed.
</del><span class="cx" style="display: block; padding: 0 10px"> # - Checks out the repository.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - Logs debug information about the runner container.
- # - Installs NodeJS 14.
- # - Sets up caching for NPM.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # - Logs debug information about the GitHub Action runner.
+ # - Installs NodeJS.
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Logs updated debug information.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # _ Installs NPM dependencies.
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Run the WordPress QUnit tests.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - todo: Configure Slack notifications for failing 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><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">+ timeout-minutes: 20
</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><span class="cx" style="display: block; padding: 0 10px"> steps:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - name: Cancel previous runs of this workflow (pull requests only)
- if: ${{ github.event_name == 'pull_request' }}
- uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # v0.8.0
-
</del><span class="cx" style="display: block; padding: 0 10px"> - name: Checkout repository
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Log debug information
</span><span class="cx" style="display: block; padding: 0 10px"> run: |
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -66,19 +65,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> svn --version
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install NodeJS
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- node-version: 14
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ node-version-file: '.nvmrc'
+ cache: npm
</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: Cache NodeJS modules
- uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
- env:
- cache-name: cache-node-modules
- with:
- # npm cache files are stored in `~/.npm` on Linux/macOS
- path: ~/.npm
- key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
-
</del><span class="cx" style="display: block; padding: 0 10px"> - name: Log debug information
</span><span class="cx" style="display: block; padding: 0 10px"> run: |
</span><span class="cx" style="display: block; padding: 0 10px"> npm --version
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -89,3 +80,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Run QUnit tests
</span><span class="cx" style="display: block; padding: 0 10px"> run: npm run grunt qunit:compiled
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ slack-notifications:
+ name: Slack Notifications
+ uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
+ needs: [ test-js ]
+ if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
+ with:
+ calling_status: ${{ needs.test-js.result == 'success' && 'success' || needs.test-js.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 }}
</ins></span></pre></div>
<a id="branches57githubworkflowsphpcompatibilityyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/.github/workflows/php-compatibility.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/.github/workflows/php-compatibility.yml 2022-06-30 16:26:30 UTC (rev 53597)
+++ branches/5.7/.github/workflows/php-compatibility.yml 2022-06-30 16:34:14 UTC (rev 53598)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4,7 +4,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # PHP compatibility testing was introduced in WordPress 5.5.
</span><span class="cx" style="display: block; padding: 0 10px"> push:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - master
</del><span class="cx" style="display: block; padding: 0 10px"> - trunk
</span><span class="cx" style="display: block; padding: 0 10px"> - '5.[5-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[6-9].[0-9]'
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,7 +12,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - '[6-9].[0-9]*'
</span><span class="cx" style="display: block; padding: 0 10px"> pull_request:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - master
</del><span class="cx" style="display: block; padding: 0 10px"> - trunk
</span><span class="cx" style="display: block; padding: 0 10px"> - '5.[5-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[6-9].[0-9]'
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -28,6 +26,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - '.github/workflows/*.yml'
</span><span class="cx" style="display: block; padding: 0 10px"> workflow_dispatch:
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# 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
+
</ins><span class="cx" style="display: block; padding: 0 10px"> jobs:
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> # Runs PHP compatibility testing.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -37,23 +42,23 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # Performs the following steps:
</span><span class="cx" style="display: block; padding: 0 10px"> # - Checks out the repository.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Sets up PHP.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - Logs debug information about the runner container.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # - Logs debug information about the GitHub Action runner.
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Installs Composer dependencies (use cache if possible).
</span><span class="cx" style="display: block; padding: 0 10px"> # - Make Composer packages available globally.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Logs PHP_CodeSniffer debug information.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Runs the PHP compatibility tests.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - todo: Configure Slack notifications for failing scans.
</del><span class="cx" style="display: block; padding: 0 10px"> php-comatibility:
</span><span class="cx" style="display: block; padding: 0 10px"> name: Check PHP compatibility
</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">+ timeout-minutes: 20
</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><span class="cx" style="display: block; padding: 0 10px"> steps:
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Checkout repository
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Set up PHP
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: shivammathur/setup-php@afefcaf556d98dc7896cca380e181decb609ca44 # v2.10.0
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: shivammathur/setup-php@3eda58347216592f618bb1dff277810b6698e4ca # v2.19.1
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> php-version: '7.4'
</span><span class="cx" style="display: block; padding: 0 10px"> coverage: none
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -65,7 +70,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> composer --version
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install Composer dependencies
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: ramsey/composer-install@92a7904348d4ad30236f3611e33b7f0c6f9edd70 # v1.1.0
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: ramsey/composer-install@f680dac46551dffb2234a240d65ae806c2999dd6 # v2.1.0
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> composer-options: "--no-progress --no-ansi --no-interaction"
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -77,3 +82,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Run PHP compatibility tests
</span><span class="cx" style="display: block; padding: 0 10px"> run: phpcs --standard=phpcompat.xml.dist -q --report=checkstyle | cs2pr
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ slack-notifications:
+ name: Slack Notifications
+ uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
+ needs: [ php-comatibility ]
+ if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
+ with:
+ calling_status: ${{ needs.php-compatibility.result == 'success' && 'success' || needs.php-compatibility.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 }}
</ins></span></pre></div>
<a id="branches57githubworkflowsphpunittestsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/.github/workflows/phpunit-tests.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/.github/workflows/phpunit-tests.yml 2022-06-30 16:26:30 UTC (rev 53597)
+++ branches/5.7/.github/workflows/phpunit-tests.yml 2022-06-30 16:34:14 UTC (rev 53598)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,7 +3,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> on:
</span><span class="cx" style="display: block; padding: 0 10px"> push:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - master
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - trunk
</ins><span class="cx" style="display: block; padding: 0 10px"> - '3.[7-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> tags:
</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"> - '[4-9].[0-9]*'
</span><span class="cx" style="display: block; padding: 0 10px"> pull_request:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - master
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - trunk
</ins><span class="cx" style="display: block; padding: 0 10px"> - '3.[7-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> workflow_dispatch:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -19,6 +19,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> schedule:
</span><span class="cx" style="display: block; padding: 0 10px"> - cron: '0 0 * * 0'
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# 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
+
</ins><span class="cx" style="display: block; padding: 0 10px"> env:
</span><span class="cx" style="display: block; padding: 0 10px"> PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
</span><span class="cx" style="display: block; padding: 0 10px"> # Controls which NPM script to use for running PHPUnit tests. Options ar `php` and `php-composer`.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -27,36 +34,21 @@
</span><span class="cx" style="display: block; padding: 0 10px"> SLOW_TESTS: 'external-http,media,restapi'
</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">- # Sets up the workflow for testing.
- #
- # Performs the following steps:
- # - Cancels all previous workflow runs for pull requests that have not completed.
- setup-workflow:
- name: Setup Workflow
- runs-on: ubuntu-latest
- if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
-
- steps:
- - name: Cancel previous runs of this workflow (pull requests only)
- if: ${{ github.event_name == 'pull_request' }}
- uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # v0.8.0
-
</del><span class="cx" style="display: block; padding: 0 10px"> # Runs the PHPUnit tests for WordPress.
</span><span class="cx" style="display: block; padding: 0 10px"> #
</span><span class="cx" style="display: block; padding: 0 10px"> # Performs the following steps:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - Set environment variables.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # - Sets environment variables.
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Sets up the environment variables needed for testing with memcached (if desired).
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - Installs NodeJS 14.
- # - Sets up caching for NPM.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # - Installs NodeJS.
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Installs NPM dependencies
</span><span class="cx" style="display: block; padding: 0 10px"> # - Configures caching for Composer.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - Installs Composer dependencies (if desired).
- # - Logs Docker debug information (about both the Docker installation within the runner).
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # - Installs Composer dependencies.
+ # - Logs Docker debug information (about the Docker installation within the runner).
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Starts the WordPress Docker container.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - Starts the memcached server after the Docker network has been created (if desired).
- # - Logs WordPress Docker container debug information.
- # - Logs debug general information.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # - Starts the Memcached server after the Docker network has been created (if desired).
+ # - Logs general debug information about the runner.
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Logs the running Docker containers.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # - Logs debug information from inside the WordPress Docker container.
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Logs debug information about what's installed within the WordPress Docker containers.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Install WordPress within the Docker container.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Run the PHPUnit tests.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -63,10 +55,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # - Checks out the WordPress Test reporter repository.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Reconnect the directory to the Git repository.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Submit the test results to the WordPress.org host test results.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - todo: Configure Slack notifications for failing tests.
</del><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 }}
</del><ins style="background-color: #dfd; 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 }}
</ins><span class="cx" style="display: block; padding: 0 10px"> runs-on: ${{ matrix.os }}
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ timeout-minutes: 20
</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">@@ -115,24 +107,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Checkout repository
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install NodeJS
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- node-version: 14
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ node-version-file: '.nvmrc'
+ cache: npm
</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: Use cached Node modules
- uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
- env:
- cache-name: cache-node-modules
- with:
- # npm cache files are stored in `~/.npm` on Linux/macOS
- path: ~/.npm
- key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
-
</del><span class="cx" style="display: block; padding: 0 10px"> - name: Install Dependencies
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- run: npx install-changed --install-command="npm ci"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ run: npm ci
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Get composer cache directory
</span><span class="cx" style="display: block; padding: 0 10px"> id: composer-cache
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -139,7 +123,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> run: echo "::set-output name=dir::$(composer config cache-files-dir)"
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Cache Composer dependencies
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4
</ins><span class="cx" style="display: block; padding: 0 10px"> env:
</span><span class="cx" style="display: block; padding: 0 10px"> cache-name: cache-composer-dependencies
</span><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -238,14 +222,27 @@
</span><span class="cx" style="display: block; padding: 0 10px"> run: LOCAL_PHP_XDEBUG=true npm run test:${{ env.PHPUNIT_SCRIPT }} -- -v --group xdebug --exclude-group __fakegroup__
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Checkout the WordPress Test Reporter
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }}
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }}
+ uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> repository: 'WordPress/phpunit-test-runner'
</span><span class="cx" style="display: block; padding: 0 10px"> path: 'test-runner'
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Submit test results to the WordPress.org host test results
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }}
</ins><span class="cx" style="display: block; padding: 0 10px"> env:
</span><span class="cx" style="display: block; padding: 0 10px"> WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}"
</span><span class="cx" style="display: block; padding: 0 10px"> 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
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ slack-notifications:
+ name: Slack Notifications
+ uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
+ needs: [ test-php ]
+ if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
+ with:
+ calling_status: ${{ needs.test-php.result == 'success' && 'success' || needs.test-php.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 }}
</ins></span></pre></div>
<a id="branches57githubworkflowstestnpmyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/.github/workflows/test-npm.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/.github/workflows/test-npm.yml 2022-06-30 16:26:30 UTC (rev 53597)
+++ branches/5.7/.github/workflows/test-npm.yml 2022-06-30 16:34:14 UTC (rev 53598)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,13 +3,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> on:
</span><span class="cx" style="display: block; padding: 0 10px"> push:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - master
</del><span class="cx" style="display: block; padding: 0 10px"> - trunk
</span><span class="cx" style="display: block; padding: 0 10px"> - '3.[7-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> pull_request:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - master
</del><span class="cx" style="display: block; padding: 0 10px"> - trunk
</span><span class="cx" style="display: block; padding: 0 10px"> - '3.[7-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]'
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25,32 +23,24 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - '.github/workflows/**.yml'
</span><span class="cx" style="display: block; padding: 0 10px"> workflow_dispatch:
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# 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
+
</ins><span class="cx" style="display: block; padding: 0 10px"> env:
</span><span class="cx" style="display: block; padding: 0 10px"> PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
</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">- # Prepares the workflow.
- #
- # Performs the following steps:
- # - Cancels all previous workflow runs for pull requests that have not completed.
- prepare-workflow:
- name: Prepare the workflow
- runs-on: ubuntu-latest
- if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
-
- steps:
- - name: Cancel previous runs of this workflow (pull requests only)
- if: ${{ github.event_name == 'pull_request' }}
- uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # v0.8.0
-
</del><span class="cx" style="display: block; padding: 0 10px"> # Verifies that installing NPM dependencies and building WordPress works as expected.
</span><span class="cx" style="display: block; padding: 0 10px"> #
</span><span class="cx" style="display: block; padding: 0 10px"> # Performs the following steps:
</span><span class="cx" style="display: block; padding: 0 10px"> # - Checks out the repository.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - Logs debug information about the runner container.
- # - Installs NodeJS 14.
- # - Sets up caching for NPM.
- # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # - Logs debug information about the GitHub Action runner.
+ # - Installs NodeJS.
+ # _ Installs NPM dependencies.
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Builds WordPress to run from the `build` directory.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Cleans up after building WordPress to the `build` directory.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Builds WordPress to run from the `src` directory.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -58,8 +48,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> test-npm:
</span><span class="cx" style="display: block; padding: 0 10px"> name: Test NPM on ${{ matrix.os }}
</span><span class="cx" style="display: block; padding: 0 10px"> runs-on: ${{ matrix.os }}
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ timeout-minutes: 20
</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">- needs: prepare-workflow
</del><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="lines" style="display: block; padding: 0 10px; color: #888">@@ -67,7 +57,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: Checkout repository
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Log debug information
</span><span class="cx" style="display: block; padding: 0 10px"> run: |
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -78,29 +68,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> svn --version
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install NodeJS
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- node-version: 14
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ node-version-file: '.nvmrc'
+ cache: npm
</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: Cache NodeJS modules (Ubuntu & MacOS)
- uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
- if: ${{ matrix.os != 'windows-latest' }}
- with:
- path: ~/.npm
- key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
-
- - name: Get NPM cache directory (Windows only)
- if: ${{ matrix.os == 'windows-latest' }}
- id: npm-cache
- run: echo "::set-output name=dir::$(npm config get cache)"
-
- - name: Cache NodeJS modules (Windows only)
- uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
- if: ${{ matrix.os == 'windows-latest' }}
- with:
- path: ${{ steps.npm-cache.outputs.dir }}
- key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
-
</del><span class="cx" style="display: block; padding: 0 10px"> - name: Install Dependencies
</span><span class="cx" style="display: block; padding: 0 10px"> run: npm ci
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -114,18 +86,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> run: npm run build:dev
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Clean after building in /src
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- run: npm run grunt clean --dev
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ run: npm run grunt clean -- --dev
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> # Verifies that installing NPM dependencies and building WordPress works as expected on MacOS.
</span><span class="cx" style="display: block; padding: 0 10px"> #
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # This is a separate job in order to that more strict conditions can be used.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # 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.
</ins><span class="cx" style="display: block; padding: 0 10px"> #
</span><span class="cx" style="display: block; padding: 0 10px"> # Performs the following steps:
</span><span class="cx" style="display: block; padding: 0 10px"> # - Checks out the repository.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - Logs debug information about the runner container.
- # - Installs NodeJS 14.
- # - Sets up caching for NPM.
- # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # - Logs debug information about the GitHub Action runner.
+ # - Installs NodeJS.
+ # _ Installs NPM dependencies.
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Builds WordPress to run from the `build` directory.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Cleans up after building WordPress to the `build` directory.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Builds WordPress to run from the `src` directory.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -133,11 +105,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> test-npm-macos:
</span><span class="cx" style="display: block; padding: 0 10px"> name: Test NPM on MacOS
</span><span class="cx" style="display: block; padding: 0 10px"> runs-on: macos-latest
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ timeout-minutes: 20
</ins><span class="cx" style="display: block; padding: 0 10px"> if: ${{ github.repository == 'WordPress/wordpress-develop' }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- needs: prepare-workflow
</del><span class="cx" style="display: block; padding: 0 10px"> steps:
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Checkout repository
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Log debug information
</span><span class="cx" style="display: block; padding: 0 10px"> run: |
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -148,17 +120,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> svn --version
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install NodeJS
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- node-version: 14
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ node-version-file: '.nvmrc'
+ cache: npm
</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: Cache NodeJS modules
- uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
- if: ${{ matrix.os != 'windows-latest' }}
- with:
- path: ~/.npm
- key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
-
</del><span class="cx" style="display: block; padding: 0 10px"> - name: Install Dependencies
</span><span class="cx" style="display: block; padding: 0 10px"> run: npm ci
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -172,4 +138,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> run: npm run build:dev
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Clean after building in /src
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- run: npm run grunt clean --dev
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 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 }}
</ins></span></pre></div>
<a id="branches57githubworkflowswelcomenewcontributorsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.7/.github/workflows/welcome-new-contributors.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.7/.github/workflows/welcome-new-contributors.yml 2022-06-30 16:26:30 UTC (rev 53597)
+++ branches/5.7/.github/workflows/welcome-new-contributors.yml 2022-06-30 16:34:14 UTC (rev 53598)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8,6 +8,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # Comments on a pull request when the author is a new contributor.
</span><span class="cx" style="display: block; padding: 0 10px"> post-welcome-message:
</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">+ timeout-minutes: 5
</ins><span class="cx" style="display: block; padding: 0 10px"> if: ${{ github.repository == 'WordPress/wordpress-develop' }}
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> steps:
</span></span></pre>
</div>
</div>
</body>
</html>