264 Commits

Author SHA1 Message Date
Jonathan Desrosiers
d713251cf3 Build/Test Tools: Update third-party GitHub Actions.
The following third-party actions have been updated to their latest versions.

- `shivammathur/setup-php` from `2.30.0` to `2.31.1`.
- `actions/setup-node` from `4.0.2` to `4.0.3`.
- `actions/cache` from `4.0.1` to `4.0.2`.
- `actions/upload-artifact` from `4.3.1` to `4.3.4`.
- `slackapi/slack-github-action` from `1.25.0` to `1.26.0`.
- `codecov/codecov-action` from `4.1.0` to `4.5.0`.

See #61564.

git-svn-id: https://develop.svn.wordpress.org/trunk@58789 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-23 18:37:03 +00:00
Jonathan Desrosiers
f9d02a2154 Build/Test Tools: Ensure TARGET_SHA is set for older branches.
The `workflow_dispatch` event payload does not contain the `before` property containing the previous commit’s SHA value, which causes scheduled runs of the performance testing workflow in older branches to fail.

This adds a step specifically for this event type to use native Git commands to retrieve the required SHA value instead.

Props joemcgill.
Fixes #61699.

git-svn-id: https://develop.svn.wordpress.org/trunk@58767 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-19 13:13:49 +00:00
Jonathan Desrosiers
8d2c73bff3 Build/Test Tools: Remove regular 6.2 & 6.3 branch performance testing.
Prior to WordPress 6.4, performance testing was performed using Puppeteer instead of Playwright (converted in [56926]). Because of the flaky nature of the workflow using Puppeteer, it was not converted to the reusable pattern implemented through #61213. It was instead removed from 6.2 and 6.3 in [58301] and [58330], respectively.

This removes the workflow for these branches from the strategy matrix when testing old branches to avoid errors and adds an expanded note about why those branches are missing.

See #61213, #61564.

git-svn-id: https://develop.svn.wordpress.org/trunk@58754 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-18 14:09:50 +00:00
Jonathan Desrosiers
e65f0f261f Build/Test Tools: Fix workflow names in test old branches workflow.
After the changes in [58165] and [58645] and all associated backports, the workflow that dispatches regular testing in older branches needed to be updated.
- The `test-npm.yml` workflow no longer exists.
- The `test-build-processes.yml` has taken the place of `test-npm.yml` in all branches.

Also, the workflow will now run whenever an old version of the reusable PHPUnit workflow is updated (v1 or v2). This is to ensure the changes don’t cause any compatibility problems in older branches.

See #61213.

git-svn-id: https://develop.svn.wordpress.org/trunk@58654 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-03 16:28:48 +00:00
Jonathan Desrosiers
4454f4aa2c Build/Test Tools: Rename current reusable PHPUnit workflow.
This adds a ` -v3` suffix to the current reusable PHPUnit workflow name. This avoids having to update older branches in the future when the workflow’s logic drastically changes and a `v4` is needed.

See #61213.

git-svn-id: https://develop.svn.wordpress.org/trunk@58645 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-03 15:51:48 +00:00
Jonathan Desrosiers
d3ac93a938 Build/Test Tools: Allow older branches to use Coding Standards workflow.
This updates the reusable coding standards GitHub Actions workflow to support the old way of running PHPCS commands when the `old-branches` input flag is set to `true`. This allows the 5.1-5.4 branches to use the same workflow as all other 5.5+ branches.

See #61213.

git-svn-id: https://develop.svn.wordpress.org/trunk@58596 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-28 18:19:51 +00:00
Jonathan Desrosiers
b9ecee377a Build/Test Tools: Introduce two additional reusable PHPUnit workflows.
The changes associated with #61213 aim to update all branches potentially receiving security updates to use the same workflow files for easier maintenance as much as possible. However, there are times when the logic found in GitHub Action workflow files changes pretty drastically.

For PHPUnit testing, there are 2 instances where this occurred: the 5.2 and 5.9 branches. This changeset introduces 2 new reusable PHPUnit workflow files for use the 4.1-5.1 and 5.2-5.9 branches.

Including these workflows in `trunk` makes it more clear which version of the workflow file is used by these old branches, and allows Dependabot to open PRs for updating 3rd-party actions within these workflows.

Props jorbin.
See #61213.

git-svn-id: https://develop.svn.wordpress.org/trunk@58595 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-28 18:16:56 +00:00
Jonathan Desrosiers
3a1e1f6a3c Post WordPress 6.6 branching version bump.
`trunk` is now `6.7-alpha`.

git-svn-id: https://develop.svn.wordpress.org/trunk@58575 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-25 17:04:59 +00:00
Pascal Birchler
19684edd62 Build/Test Tools: install additional languages in end-to-end tests.
As a follow-up to [58430], this makes another locale available during the e2e tests, allowing testing of scenarios that require loading translations in the future.

See #61240.

git-svn-id: https://develop.svn.wordpress.org/trunk@58431 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-18 10:49:29 +00:00
Jonathan Desrosiers
9ff77917b2 Build/Test Tools: Make OS detection more generic in job names.
This prevents workflow runs in older branches that are using older versions of runner images from displaying the wrong operating system in job names.

Because the updated files are reusable, this change will automatically fix the issue in all older branches without the need to backport.

See #61213.

git-svn-id: https://develop.svn.wordpress.org/trunk@58351 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-05 19:27:33 +00:00
Jonathan Desrosiers
bb351ae80f Build/Test Tools: Simplify inputs for build process testing.
This introduces a new input to separate the ability to save the built WordPress ZIP from generating the artifacts necessary for comments with Playground testing details.

The ZIP file is used by the performance testing workflow for performing comparisons, so it should be built and saved for every `push` event. The Playground related steps should only run on `pull_request`.

Follow up to [58274].

Props jorbin.
See #59416.

git-svn-id: https://develop.svn.wordpress.org/trunk@58345 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-05 18:23:08 +00:00
Jonathan Desrosiers
6765098b23 Build/Test Tools: Add an input to allow errors for the PHPUnit workflow.
This allows a calling workflow to configure the PHPUnit workflow to `continue-on-error` when one occurs. This is useful for older branches where support for a specific version of PHP was not at 100% within the test suite.

Follow up to [58165], [58269], [58270], [58329].

See #61213.

git-svn-id: https://develop.svn.wordpress.org/trunk@58331 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-04 13:49:31 +00:00
Jonathan Desrosiers
8e2a83ce35 Build/Test Tools: Add a PHP version input for E2E workflow.
This allows a specific version of PHP to be used when calling the reusable end-to-end testing workflow, which is particularly useful in older branches.

Follow up to [58165], [58269], [58270].

See #61213.

git-svn-id: https://develop.svn.wordpress.org/trunk@58329 602fd350-edb4-49c9-b593-d223f7449a82
2024-06-04 12:44:59 +00:00
Jonathan Desrosiers
93bcf8da93 Build/Test Tools: Make the logic around Playground testing reusable.
The workflow responsible for testing the build process is currently responsible for creating a ZIP file of the WordPress build and storing it as an artifact. This can be used for manual testing, but is mainly used for spinning up a Playground instance.

Because of how comments with Playground testing instructions are left pull requests. the pull request number needs to be stored as a workflow artifact as well. This moves the logic responsible for this to the reusable workflow, which allows older branches to make use of Playground testing without additional maintenance burden.

See #59416.

git-svn-id: https://develop.svn.wordpress.org/trunk@58274 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-31 18:11:30 +00:00
Jonathan Desrosiers
23034419b6 Build/Test Tools: Correct conditional logic in [58269].
See #60127, #61213.

git-svn-id: https://develop.svn.wordpress.org/trunk@58270 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-31 16:02:57 +00:00
Jonathan Desrosiers
6a697a2337 Build/Test Tools: Add input for PHP version to the performance workflow.
This adds a new input to the reusable performance testing workflow for accepting a PHP version. This allows the workflow to be reused in older branches when the PHP version currently tagged `latest` was not supported.

Props swissspidy, joemcgill.
See #60127, #61213.

git-svn-id: https://develop.svn.wordpress.org/trunk@58269 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-31 15:56:31 +00:00
Jonathan Desrosiers
fe3bc4af19 Build/Test Tools: Convert GitHub action workflows into reusable ones.
With a few exceptions, GitHub Actions workflows run using the version of the workflow file present in the commit SHA or Git ref for the triggering event. This is useful for maintaining different versions of a workflow file.

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

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

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

Props johnbillion, swissspidy, jorbin, desrosj.
Fixes #61213.

git-svn-id: https://develop.svn.wordpress.org/trunk@58165 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-17 17:41:40 +00:00
Jonathan Desrosiers
6ee6fcb7f3 Build/Test Tools: Don’t upload HTML reports to Codecov.
When generating a human readable code coverage report in HTML format, the Codecov action used to fail silently. An error is now being returned, resulting in a workflow failure.

This adds a skip condition to the appropriate steps so the coverage report is only uploaded when a `clover` format is generated.

See #60733.

git-svn-id: https://develop.svn.wordpress.org/trunk@58144 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-14 15:18:37 +00:00
Jonathan Desrosiers
2747683090 Build/Test Tools: Remove check-latest input for setup-node.
The `check-latest` setting is used to ensure the latest version of Node.js is always installed in GitHub Action workflows.

This input was added and turned on in [57212] when the minimum required version of Node.js was bumped to `20.10.0`. Because GitHub Action runner image updates are deployed on a rolling basis over the course of several days, a version of Node.js that met this new requirement was not always present (especially on Windows runners). Using this input was a temporary fix to ensure stability for Core’s test workflows. 

The `check-latest` input does have some side effects. Two examples are:
- An additional request is performed to check the latest version every time `setup-node` is used with this option enabled. More requests are made to download and install a newer version of Node.js when one is available.
- When new versions of Node.js are released, the Core workflows immediately switch to the new version, which could potentially have undiscovered bugs or regressions.

The latter has surfaced today due to a regression in Node.js 20.13.0 on Windows (see https://github.com/nodejs/node/issues/52884).

A bit of time has passed and a version >=20.10.0 is now reliably available on all GitHub Action runners. Running the very latest release Node.js is also not important for Core’s testing setup, so `check-version` can safely be removed to address both side effects detailed above. 

Props johnbillion.
Fixes #60129.

git-svn-id: https://develop.svn.wordpress.org/trunk@58120 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-08 19:16:21 +00:00
John Blackbourn
7750458133 Bootstrap/Load: Add support for custom ports in multisite site addresses.
This allows a Multisite network to use an address that includes a port name, such as `example.com:1234`, and adds support for this to the local development environment too. You can now run a Multisite installation on the local development environment, for example at `localhost:8889`.

This also fixes some bugs with running a single site installation on a port, and updates the testing infrastructure so that the whole test suite runs both with and without a port number.

Props djzone, scribu, nacin, ipstenu, F J Kaiser, jeremyfelt, johnjamesjacoby, spacedmonkey, PerS, Clorith, Blackbam, enrico.sorcinelli, Jules Colle, obliviousharmony, desrosj, johnbillion

Fixes #21077, #52088

git-svn-id: https://develop.svn.wordpress.org/trunk@58097 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-04 19:23:31 +00:00
Jonathan Desrosiers
8175698ba5 Build/Test Tools: Remind contributors to include a Trac ticket link.
Contributing to WordPress using `wordpress-develop` on GitHub is a useful way collaborate, test, and review suggested changes to the code base. One of the required criteria, though, is including a link to a corresponding Trac ticket. This ensures the PR and associated activity is listed on the Trac ticket, which serves as the source of truth.

It’s easy to forget this and newer contributors aren’t always aware of this requirement. This adds a GitHub Actions job that will add a comment as a reminder when no Trac ticket is included.

Is the waiting really ended? Two thousand years.

Props anamarijapapic, peterwilsoncc.
Fixes #60129.

git-svn-id: https://develop.svn.wordpress.org/trunk@58092 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-03 12:37:05 +00:00
Pascal Birchler
53b75a10fc Build/Test Tools: Overhaul performance tests to improve stability and cover more scenarios.
Simplifies the tests setup by leveraging a test matrix, improving maintenance and making it much easier to test more scenarios. With this change, tests are now also run with an external object cache (Memcached). Additional information such as memory usage and the number of database queries is now collected as well.

Improves test setup and cleanup by disabling external HTTP requests and cron for the tests, as well as deleting expired transients and flushing the cache in-between. This should aid the test stability.

When testing the previous commit / target branch, this now leverages the already built artifact from the build process workflow. Raw test results are now also uploaded as artifacts to aid debugging.

Props swissspidy, adamsilverstein, joemcgill, mukesh27, desrosj, youknowriad, flixos90.
Fixes #59900

git-svn-id: https://develop.svn.wordpress.org/trunk@58076 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-02 13:57:49 +00:00
John Blackbourn
d952352987 General: Increase the minimum supported version of PHP to 7.2.24.
Props justlevine, masteradhoc, samiamnot, hellofromTonya, azaozz, jrf, dd32, desrosj, jorbin

Fixes #58719


git-svn-id: https://develop.svn.wordpress.org/trunk@57985 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-11 21:09:49 +00:00
Pascal Birchler
f158f6d3f2 Build/Test Tools: Migrate to Docker Compose V2.
Compose V2, which was first released in 2020, is included with all currently supported versions of Docker Desktop. Compose V1 stopped receiving updates in July 2023.

The biggest difference is that the command to interact with Compose changed from `docker-compose` to `docker compose`.

GitHub has now started removing V1 from Ubuntu & Windows images, which caused all Docker-based GitHub Actions workflows to fail.

This change migrates to the new `docker compose` command to address these failures.

Props swissspidy, thelovekesh.
Fixes #60901.

git-svn-id: https://develop.svn.wordpress.org/trunk@57918 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-03 11:31:43 +00:00
Jonathan Desrosiers
1909e231a2 Build/Test Tools: Include 6.4 and 6.5 in upgrade testing.
This ensures that upgrading from 6.4 and 6.5 to the desired version is actually tested.

See #60733.

git-svn-id: https://develop.svn.wordpress.org/trunk@57915 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-02 19:17:07 +00:00
Jonathan Desrosiers
0acfd3a72c Build/Test Tools: Do not run Props Bot for certain actions from forks.
For PRs that originate from forked repositories, `pull_request_review` and `pull_request_review_comment` events do not have the permissions necessary to comment on the PR.

This avoids needlessly running the bot when these conditions are met.

Props jorbin, wildworks.
See #60733.

git-svn-id: https://develop.svn.wordpress.org/trunk@57795 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-09 01:07:52 +00:00
Jonathan Desrosiers
a227c14479 Build/Test Tools: Add build process test workflow to old branches testing.
Now that 6.5 has been branched, the `test-build-processes.yml` workflow can be added to the list of workflows to run for old branches.

Fixes #59632.

git-svn-id: https://develop.svn.wordpress.org/trunk@57783 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-06 00:32:33 +00:00
David Baumwald
1a9c58fdbe Trunk is now 6.6 alpha.
git-svn-id: https://develop.svn.wordpress.org/trunk@57782 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 17:16:07 +00:00
Jonathan Desrosiers
81a4c4cdf0 Build/Test Tools: Fix the precommit:emoji script.
GitHub recently sunset support for Subversion, causing the `precommit:emoji` Grunt script to break. Since there’s no direct replacement for `svn ls` in Git, this has been replaced with a query through the GitHub CLI.

This also adds a step in the workflow that tests the build process to run the `precommit:emoji` script to ensure no changes to built files are missed when updating the Twemoji library in the future.

Follow up to [57626].

Props kraftbj, peterwilsoncc, swissspidy.
Fixes #60520. See #57600.

git-svn-id: https://develop.svn.wordpress.org/trunk@57758 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-04 11:23:59 +00:00
Jonathan Desrosiers
79f570a7a2 Build/Test Tools: Update 3rd-party GitHub Actions.
This updates the following GitHub Actions to their latest versions:

- `shivammathur/setup-php` from `2.29.0` to `2.30.0`
- `actions/cache` from `4.0.0` to `4.0.1`
- `ramsey/composer-install` from `2.2.0` to `3.0.0`
- `codecov/codecov-action` from `4.0.1` to `4.1.0`

This should address the remaining notices caused by running Node.js 16.x on GitHub Actions runner machines in `trunk`.

Follow up to [57197], [57362], [57655].

See #59805.

git-svn-id: https://develop.svn.wordpress.org/trunk@57757 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-04 11:04:12 +00:00
Pascal Birchler
8ee7651d0e Build/Test Tools: Update third-party GitHub Actions.
This updates the following third-party GitHub Actions to their latest versions:

* Updates `actions/setup-node` from 4.0.1 to 4.0.2
* Updates `actions/upload-artifact` from 4.3.0 to 4.3.1

Props desrosj, thelovekesh.
See #59805.

git-svn-id: https://develop.svn.wordpress.org/trunk@57655 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-19 08:57:19 +00:00
Jonathan Desrosiers
4498eefb00 Build/Test Tools: Generate a human-readable HTML coverage report.
This updates the test coverage GitHub Actions workflow to generate a human-readable HTML report in addition to the current machine readable one submitted to Codecov.

Props jorbin.
Fixes #60476.

git-svn-id: https://develop.svn.wordpress.org/trunk@57570 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-08 19:30:26 +00:00
Jonathan Desrosiers
f8b9b2abd7 Build/Test Tools: Unpin PHP 7.4 from the test coverage workflow.
Since being introduced, the GitHub Actions workflow responsible for generating and submitting a test coverage report has used PHP 7.4. At the time, there were some issues with running the test suite on PHP 8.0+ which could have resulted in inaccurate reporting.

The test suite and WordPress in general are much more stable on 8.x now. The test coverage report should now be generated using the Docker container tagged `latest` (currently 8.2).

This will result in a very small decrease in the percentage of lines covered by test (-0.05%), but a slight increase in the percentage of functions and methods covered (+0.08%).

Props johnbillion.
See #59647.

git-svn-id: https://develop.svn.wordpress.org/trunk@57566 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-08 15:35:54 +00:00
Jonathan Desrosiers
86f8a3c1ce Build/Test Tools: Revert [57551].
Problematic changes to the test reporter were merged upstream. This specific SHA also did not fix the issue.

Props javiercasares.
See #59647.

git-svn-id: https://develop.svn.wordpress.org/trunk@57552 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-07 13:55:50 +00:00
Jonathan Desrosiers
e285ac84b8 Build/Test Tools: Pin a specific commit for Hosting Test Reporter.
An upstream change in the Hosting Test Reporter is causing failures in the PHPUnit workflow. This temporarily pins an older hash to the step that checks the reporter out.

Props youknowriad.
See #59647.

git-svn-id: https://develop.svn.wordpress.org/trunk@57551 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-07 11:29:55 +00:00
Aaron Jorbin
3eb7bd1b29 Build/Test Tools: Make the props bot message shorter.
The new default is a git flavored version, while Core wants the SVN flavor. This update is required after https://github.com/WordPress/props-bot-action/pull/61

Props desrosj, jorbin, noisysocks, gziolo.
See #60417.


git-svn-id: https://develop.svn.wordpress.org/trunk@57544 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-06 21:11:27 +00:00
Jonathan Desrosiers
1950da3f17 Build/Test Tools: Pass a token to the Codecov action.
Version 4 of the action now requires a token to be provided in order to upload coverage results.

Follow up to [57534].

Props swissspidy.
See #59658.

git-svn-id: https://develop.svn.wordpress.org/trunk@57536 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-05 22:19:19 +00:00
Jonathan Desrosiers
4e633b50a1 Build/Test Tools: Update the codecov/codecov-action action.
This updates the `codecov/codecov-action` from version `3.1.5` to `4.0.1`.

Version 4 switches to using the Codecov CLI to upload test report date, and changes the version of Node.js used for the action to 20.x. This fixes the notices currently shown for the test coverage workflow.

Props: mukesh27.
See #59658.

git-svn-id: https://develop.svn.wordpress.org/trunk@57534 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-05 20:58:59 +00:00
Jonathan Desrosiers
e9e2281afe Build/Test Tools: Some improvements to the Props Bot workflow.
This makes a few improvements made to the Props Bot workflow:

- The bot will no longer run on draft PRs.
- The bot will no longer run on closed PRs.
- The bot will no longer run when a comment is deleted (this should almost never happen).

Props mamaduka, gziolo.
See #60417.

git-svn-id: https://develop.svn.wordpress.org/trunk@57523 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-02 16:35:59 +00:00
Jonathan Desrosiers
9486dc1bec Build/Test Tools: Introduce Props Bot workflow.
Props Bot is a new GitHub Action that will compile a list of contributors for a given pull request. The bot will leave a comment with a list of contributors formatted for use in both Trac SVN and GitHub.

Props dharm1025, desrosj, jorbin, jeffpaul, dd32, pento, gziolo, swissspidy, talldanwp, noisysocks, youknowriad, peterwilsoncc, joemcgill, chrisdavidmiles, wpscholar, annezazu, chanthaboune, desrosjbot.
See #60417.

git-svn-id: https://develop.svn.wordpress.org/trunk@57517 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-01 19:26:10 +00:00
Jonathan Desrosiers
94e6fe9f8a Build/Test Tools: Test against MySQL 8.3
Version 8.3 is the latest short-term innovation release of MySQL.

See #59779.

git-svn-id: https://develop.svn.wordpress.org/trunk@57379 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-30 00:32:50 +00:00
Jonathan Desrosiers
393f67387f Build/Test Tools: Update third-party Slack action.
This updates the `slackapi/slack-github-action` from `1.24.0` to `1.25.0`. This fixes more GitHub Action deprecated notices.

Follow up to [57362].

See #59805.

git-svn-id: https://develop.svn.wordpress.org/trunk@57376 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-29 15:04:27 +00:00
Jonathan Desrosiers
d7d91b8f90 Build/Test Tools: Update third-party GitHub Actions.
This updates the following third-party GitHub Actions to their latest versions:

- `actions/setup-node` from `3.8.1` to `4.0.1`
- `actions/upload-artifact` from `3.1.2` to `4.3.0`
- `shivammathur/setup-php` from `2.28.0` to `2.29.0`
- `actions/cache` from `3.3.2` to `4.0.0`
- `codecov/codecov-action` from `3.1.4` to `3.1.5`

Most notably, these updates silence newly encountered notices as a result of GitHub beginning to transition away from Node.js 16 to Node.js 20 (see https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/).

Props swissspidy.
See #59805.

git-svn-id: https://develop.svn.wordpress.org/trunk@57362 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-26 13:48:01 +00:00
Jonathan Desrosiers
71cb3f8615 Build/Test Tools: Increase the max old space size in Node.
The Test Build Processes workflow started failing recently on MacOS runners due to “JavaScript heap out of memory” errors (see https://github.com/WordPress/wordpress-develop/actions/runs/7421385568/job/20209241826#step:8:82).

This increases the maximum memory size of the old memory section in Node from the default of 4GB to 8GB (specified in megabytes) to avoid unnecessary failures while ways to optimize the Gutenberg build process are explored.

Props dmsnell, joemcgill, hellofromTonya, isabel_brison.
See #59805.

git-svn-id: https://develop.svn.wordpress.org/trunk@57250 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-08 18:36:56 +00:00
Jonathan Desrosiers
cc645160ab Build/Test Tools: Remove svn debug command.
SVN support has officially been sunset by GitHub. While SVN was not has not been utilized in GitHub Action workflows, the version of SVN being used has been output for debugging purposes.

This removes those debug lines to prevent encountering failures as new versions of test runners are pushed out without `svn` installed.

See https://github.blog/changelog/2024-01-08-subversion-has-been-sunset/.

See #59805.

git-svn-id: https://develop.svn.wordpress.org/trunk@57249 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-08 15:49:27 +00:00
Jonathan Desrosiers
ea2f0e6d60 Build/Test Tools: Run installation tests when data files are updated.
When the JSON data files that supply the PHP/MySQL version support to the installation test workflow are changed, the workflow should be run to confirm the changes are correct. This updates the `path` filtering rules to ensure this happens.

Follow up to [57218], [57219].

See #58977.

git-svn-id: https://develop.svn.wordpress.org/trunk@57220 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-22 01:21:27 +00:00
Jonathan Desrosiers
434ef23a66 Build/Test Tools: Make the install testing workflow more flexible.
In [56661], a new GitHub Actions workflow was introduced that focused on running some minimal installation tests for a version of WordPress for every PHP and MySQL combination.

This workflow has tested well, but lacks flexibility and possesses one flaw: tests are only ever performed with currently supported versions, even if the version being tested had a different support policy.

This updates the workflow to be more flexible, allowing all versions of WordPress currently receiving security fixes (back through 4.1) to be tested under the correct support policy.

Additionally, the workflow can now run against the `nightly` build of WordPress. This replaces `latest` as the new default. This allows the tests to be run at any point during a release cycle without the need for an officially tagged version.

Props jorbin, joemcgill, costdev.
See #58977.

git-svn-id: https://develop.svn.wordpress.org/trunk@57218 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-22 00:58:26 +00:00
Jonathan Desrosiers
d522886b27 Build/Test Tools: Raise minimum required version of Node.js/npm.
This bumps the minimum required version of Node.js/npm from 16.19.1 and 8.19.3 to 20.10.0 and 10.2.3.

Since 20.10.0 is the latest 20.x version of Node.js, the `check-latest` option has been enabled for `actions/setup-node` in GitHub Actions workflows. This performs an additional external call to the Node.js API confirming the latest version is installed on the runner for use. In testing, it seems that 20.10.0 was not consistently deployed to all runner machines in use. This should be removed in the near future when the version of Node.js is reliably above the new minimum requirement.

The Gutenberg repository has also been updated to use the same values for `engines`.

Props jorbin, joemcgill, swissspidy, benharri, dhrupo, flootr, gziolo, noahtallen.
See #59663.

git-svn-id: https://develop.svn.wordpress.org/trunk@57212 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-20 18:44:57 +00:00
Pascal Birchler
e62bad5a2c Build/Test Tools: Post message for testing on Playground only after build succeeds.
Uses the `workflow_run` trigger to only leave pull request comments after the build jobs finish.

Props zieladam, desrosj.
See #59416.

git-svn-id: https://develop.svn.wordpress.org/trunk@57210 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-20 14:50:11 +00:00
Jonathan Desrosiers
6352f248f7 Build/Test Tools: Add more context to artifact names.
This adds a bit more context to the E2E workflow artifact names in order to avoid duplicates being uploaded.

With the update to v4 of `actions/upload-artifact` in [57197], artifacts are now uploaded on a per job basis. Multiple jobs cannot upload the same artifact.

Props johnbillion.
See #59805.

git-svn-id: https://develop.svn.wordpress.org/trunk@57203 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-18 20:33:00 +00:00