<!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>[51357] branches/5.8: Build/Test Tools: Add assertions to ensure version-controlled files are not modified during CI, and fix the `grunt clean` command.</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/51357">51357</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/51357","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>johnbillion</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2021-07-06 19:12:23 +0000 (Tue, 06 Jul 2021)</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: Add assertions to ensure version-controlled files are not modified during CI, and fix the `grunt clean` command.

Some tests and some commands that run during the build steps modify files that are under version control. This adds assertions to ensure that these files don't remain in a modified state after the test runs on CI.

This also fixes the `grunt clean` command which erroneously deletes `script-loader-packages.php`. This file is re-populated during the build, but deleting it during the clean is undesirable.

Merges <a href="https://core.trac.wordpress.org/changeset/51355">[51355]</a> to the 5.8 branch.

Fixes <a href="https://core.trac.wordpress.org/ticket/53606">#53606</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branches58githubworkflowscodingstandardsyml">branches/5.8/.github/workflows/coding-standards.yml</a></li>
<li><a href="#branches58githubworkflowsendtoendtestsyml">branches/5.8/.github/workflows/end-to-end-tests.yml</a></li>
<li><a href="#branches58githubworkflowsjavascripttestsyml">branches/5.8/.github/workflows/javascript-tests.yml</a></li>
<li><a href="#branches58githubworkflowsphpcompatibilityyml">branches/5.8/.github/workflows/php-compatibility.yml</a></li>
<li><a href="#branches58githubworkflowsphpunittestsyml">branches/5.8/.github/workflows/phpunit-tests.yml</a></li>
<li><a href="#branches58githubworkflowstestcoverageyml">branches/5.8/.github/workflows/test-coverage.yml</a></li>
<li><a href="#branches58githubworkflowstestnpmyml">branches/5.8/.github/workflows/test-npm.yml</a></li>
<li><a href="#branches58githubworkflowstestoldbranchesyml">branches/5.8/.github/workflows/test-old-branches.yml</a></li>
<li><a href="#branches58Gruntfilejs">branches/5.8/Gruntfile.js</a></li>
</ul>

<h3>Property Changed</h3>
<ul>
<li><a href="#branches58">branches/5.8/</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<span class="cx" style="display: block; padding: 0 10px">Index: branches/5.8
</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.8 2021-07-06 18:37:16 UTC (rev 51356)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ branches/5.8  2021-07-06 19:12:23 UTC (rev 51357)
</ins><a id="branches58"></a>
<div class="propset"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Property changes: branches/5.8</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:51274,51277,51279-51284,51286-51289,51292-51294,51296,51304,51307,51309,51321-51324,51332,51343-51344,51349,51353
</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:51274,51277,51279-51284,51286-51289,51292-51294,51296,51304,51307,51309,51321-51324,51332,51343-51344,51349,51353,51355
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="branches58githubworkflowscodingstandardsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/.github/workflows/coding-standards.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/.github/workflows/coding-standards.yml       2021-07-06 18:37:16 UTC (rev 51356)
+++ branches/5.8/.github/workflows/coding-standards.yml 2021-07-06 19:12:23 UTC (rev 51357)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -55,6 +55,7 @@
</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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # - Ensures version-controlled files are not modified or deleted.
</ins><span class="cx" style="display: block; padding: 0 10px">   # - todo: Configure Slack notifications for failing scans.
</span><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="lines" style="display: block; padding: 0 10px; color: #888">@@ -94,6 +95,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">       - name: Check test suite files for warnings
</span><span class="cx" style="display: block; padding: 0 10px">         run: phpcs tests -q --report=checkstyle | cs2pr
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+      - name: Ensure version-controlled files are not modified during the tests
+        run: git diff --exit-code
+
</ins><span class="cx" style="display: block; padding: 0 10px">   # Runs the JavaScript coding standards checks.
</span><span class="cx" style="display: block; padding: 0 10px">   #
</span><span class="cx" style="display: block; padding: 0 10px">   # JSHint violations are not currently reported inline with annotations.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -106,6 +110,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">   # - Logs updated debug information.
</span><span class="cx" style="display: block; padding: 0 10px">   # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
</span><span class="cx" style="display: block; padding: 0 10px">   # - Run the WordPress JSHint checks.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # - Ensures version-controlled files are not modified or deleted.
</ins><span class="cx" style="display: block; padding: 0 10px">   # - todo: Configure Slack notifications for failing tests.
</span><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="lines" style="display: block; padding: 0 10px; color: #888">@@ -149,3 +154,6 @@
</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">+
+      - name: Ensure version-controlled files are not modified or deleted
+        run: git diff --exit-code
</ins></span></pre></div>
<a id="branches58githubworkflowsendtoendtestsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/.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.8/.github/workflows/end-to-end-tests.yml       2021-07-06 18:37:16 UTC (rev 51356)
+++ branches/5.8/.github/workflows/end-to-end-tests.yml 2021-07-06 19:12:23 UTC (rev 51357)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -46,6 +46,7 @@
</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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # - Ensures version-controlled files are not modified or deleted.
</ins><span class="cx" style="display: block; padding: 0 10px">   # - todo: Configure Slack notifications for failing tests.
</span><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="lines" style="display: block; padding: 0 10px; color: #888">@@ -122,3 +123,6 @@
</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">+
+      - name: Ensure version-controlled files are not modified or deleted
+        run: git diff --exit-code
</ins></span></pre></div>
<a id="branches58githubworkflowsjavascripttestsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/.github/workflows/javascript-tests.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/.github/workflows/javascript-tests.yml       2021-07-06 18:37:16 UTC (rev 51356)
+++ branches/5.8/.github/workflows/javascript-tests.yml 2021-07-06 19:12:23 UTC (rev 51357)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -50,6 +50,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">   # - Logs updated debug information.
</span><span class="cx" style="display: block; padding: 0 10px">   # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
</span><span class="cx" style="display: block; padding: 0 10px">   # - Run the WordPress QUnit tests.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # - Ensures version-controlled files are not modified or deleted.
</ins><span class="cx" style="display: block; padding: 0 10px">   # - todo: Configure Slack notifications for failing tests.
</span><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="lines" style="display: block; padding: 0 10px; color: #888">@@ -91,3 +92,6 @@
</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">+
+      - name: Ensure version-controlled files are not modified or deleted
+        run: git diff --exit-code
</ins></span></pre></div>
<a id="branches58githubworkflowsphpcompatibilityyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/.github/workflows/php-compatibility.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/.github/workflows/php-compatibility.yml      2021-07-06 18:37:16 UTC (rev 51356)
+++ branches/5.8/.github/workflows/php-compatibility.yml        2021-07-06 19:12:23 UTC (rev 51357)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -49,6 +49,7 @@
</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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # - Ensures version-controlled files are not modified or deleted.
</ins><span class="cx" style="display: block; padding: 0 10px">   # - todo: Configure Slack notifications for failing scans.
</span><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="lines" style="display: block; padding: 0 10px; color: #888">@@ -84,3 +85,6 @@
</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">+
+      - name: Ensure version-controlled files are not modified or deleted
+        run: git diff --exit-code
</ins></span></pre></div>
<a id="branches58githubworkflowsphpunittestsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/.github/workflows/phpunit-tests.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/.github/workflows/phpunit-tests.yml  2021-07-06 18:37:16 UTC (rev 51356)
+++ branches/5.8/.github/workflows/phpunit-tests.yml    2021-07-06 19:12:23 UTC (rev 51357)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -56,6 +56,7 @@
</span><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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # - Ensures version-controlled files are not modified or deleted.
</ins><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><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -230,6 +231,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">         if: ${{ ! matrix.split_slow }}
</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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+      - name: Ensure version-controlled files are not modified or deleted
+        run: git diff --exit-code
+
</ins><span class="cx" style="display: block; padding: 0 10px">       - name: Checkout the WordPress Test Reporter
</span><span class="cx" style="display: block; padding: 0 10px">         if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }}
</span><span class="cx" style="display: block; padding: 0 10px">         uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</span></span></pre></div>
<a id="branches58githubworkflowstestcoverageyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/.github/workflows/test-coverage.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/.github/workflows/test-coverage.yml  2021-07-06 18:37:16 UTC (rev 51356)
+++ branches/5.8/.github/workflows/test-coverage.yml    2021-07-06 19:12:23 UTC (rev 51357)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,8 +44,10 @@
</span><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 as a single site.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # - Ensures version-controlled files are not modified or deleted.
</ins><span class="cx" style="display: block; padding: 0 10px">   # - Upload the single site code coverage report to Codecov.io.
</span><span class="cx" style="display: block; padding: 0 10px">   # - Run the PHPUnit tests as a multisite.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # - Ensures version-controlled files are not modified or deleted.
</ins><span class="cx" style="display: block; padding: 0 10px">   # - Upload the multisite code coverage report to Codecov.io.
</span><span class="cx" style="display: block; padding: 0 10px">   test-coverage-report:
</span><span class="cx" style="display: block; padding: 0 10px">     name: ${{ matrix.multisite && 'Multisite' || 'Single site' }} report
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -130,6 +132,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">         if: ${{ ! matrix.multisite }}
</span><span class="cx" style="display: block; padding: 0 10px">         run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --coverage-clover wp-code-coverage-single-clover-${{ github.sha }}.xml
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+      - name: Ensure version-controlled files are not modified during the tests
+        run: git diff --exit-code
+
</ins><span class="cx" style="display: block; padding: 0 10px">       - name: Upload single site report to Codecov
</span><span class="cx" style="display: block; padding: 0 10px">         if: ${{ ! matrix.multisite }}
</span><span class="cx" style="display: block; padding: 0 10px">         uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 # v1.2.1
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -141,6 +146,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">         if: ${{ matrix.multisite }}
</span><span class="cx" style="display: block; padding: 0 10px">         run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --coverage-clover wp-code-coverage-multisite-clover-${{ github.sha }}.xml
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+      - name: Ensure version-controlled files are not modified during the tests
+        run: git diff --exit-code
+
</ins><span class="cx" style="display: block; padding: 0 10px">       - name: Upload multisite report to Codecov
</span><span class="cx" style="display: block; padding: 0 10px">         if: ${{ matrix.multisite }}
</span><span class="cx" style="display: block; padding: 0 10px">         uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 # v1.2.1
</span></span></pre></div>
<a id="branches58githubworkflowstestnpmyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/.github/workflows/test-npm.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/.github/workflows/test-npm.yml       2021-07-06 18:37:16 UTC (rev 51356)
+++ branches/5.8/.github/workflows/test-npm.yml 2021-07-06 19:12:23 UTC (rev 51357)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -46,8 +46,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">   # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
</span><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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # - Ensures version-controlled files are not modified or deleted.
</ins><span class="cx" style="display: block; padding: 0 10px">   # - Builds WordPress to run from the `src` directory.
</span><span class="cx" style="display: block; padding: 0 10px">   # - Cleans up after building WordPress to the `src` directory.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # - Ensures version-controlled files are not modified or deleted.
</ins><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><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -102,6 +104,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">       - name: Clean after building
</span><span class="cx" style="display: block; padding: 0 10px">         run: npm run grunt clean
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+      - name: Ensure version-controlled files are not modified or deleted during building and cleaning
+        run: git diff --exit-code
+
</ins><span class="cx" style="display: block; padding: 0 10px">       - name: Build WordPress in /src
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -108,6 +113,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">       - name: Clean after building in /src
</span><span class="cx" style="display: block; padding: 0 10px">         run: npm run grunt clean -- --dev
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+      - name: Ensure version-controlled files are not modified or deleted during building and cleaning
+        run: git diff --exit-code
+
</ins><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><span class="cx" style="display: block; padding: 0 10px">   # This is a separate job in order to that more strict conditions can be used.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -120,8 +128,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">   # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
</span><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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # - Ensures version-controlled files are not modified or deleted.
</ins><span class="cx" style="display: block; padding: 0 10px">   # - Builds WordPress to run from the `src` directory.
</span><span class="cx" style="display: block; padding: 0 10px">   # - Cleans up after building WordPress to the `src` directory.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  # - Ensures version-controlled files are not modified or deleted.
</ins><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><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -159,8 +169,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">       - name: Clean after building
</span><span class="cx" style="display: block; padding: 0 10px">         run: npm run grunt clean
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+      - name: Ensure version-controlled files are not modified or deleted during building and cleaning
+        run: git diff --exit-code
+
</ins><span class="cx" style="display: block; padding: 0 10px">       - name: Build WordPress in /src
</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><span class="cx" style="display: block; padding: 0 10px">         run: npm run grunt clean -- --dev
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+      - name: Ensure version-controlled files are not modified or deleted during building and cleaning
+        run: git diff --exit-code
</ins></span></pre></div>
<a id="branches58githubworkflowstestoldbranchesyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/.github/workflows/test-old-branches.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/.github/workflows/test-old-branches.yml      2021-07-06 18:37:16 UTC (rev 51356)
+++ branches/5.8/.github/workflows/test-old-branches.yml        2021-07-06 19:12:23 UTC (rev 51357)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -67,3 +67,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">               workflow_id: '${{ matrix.workflow }}',
</span><span class="cx" style="display: block; padding: 0 10px">               ref: '${{ matrix.branch }}'
</span><span class="cx" style="display: block; padding: 0 10px">             });
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+      - name: Ensure version-controlled files are not modified during the tests
+        run: git diff --exit-code
</ins></span></pre></div>
<a id="branches58Gruntfilejs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/Gruntfile.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/Gruntfile.js 2021-07-06 18:37:16 UTC (rev 51356)
+++ branches/5.8/Gruntfile.js   2021-07-06 19:12:23 UTC (rev 51357)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -122,7 +122,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                WORKING_DIR + 'wp-includes/js/'
</span><span class="cx" style="display: block; padding: 0 10px">                        ],
</span><span class="cx" style="display: block; padding: 0 10px">                        'webpack-assets': [
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                WORKING_DIR + 'wp-includes/assets/'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         WORKING_DIR + 'wp-includes/assets/*',
+                               '!' + WORKING_DIR + 'wp-includes/assets/script-loader-packages.php'
</ins><span class="cx" style="display: block; padding: 0 10px">                         ],
</span><span class="cx" style="display: block; padding: 0 10px">                        dynamic: {
</span><span class="cx" style="display: block; padding: 0 10px">                                dot: true,
</span></span></pre>
</div>
</div>

</body>
</html>