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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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