This makes some post-branching changes to the 6.8 branch:
- Pins the most newest supported version of PHP for the local Docker environment
- Switches to using remote references for GitHub Action workflows
- Removes GitHub Action workflow files that will never run from this branch.
See #63164.
git-svn-id: https://develop.svn.wordpress.org/branches/6.8@60092 602fd350-edb4-49c9-b593-d223f7449a82
This updates the following GitHub Actions:
- `actions/upload-artifact` from `4.6.1` to `4.6.2`
- `actions/download-artifact` from `4.1.9` to `4.2.1`
- `actions/cache` from `4.2.2` to `4.2.3`
Though these are minor updates, they include a hardening change, switching to masking cache entry tokens in debug logs.
Fixes#62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@60083 602fd350-edb4-49c9-b593-d223f7449a82
Currently, workflows are configured to only run for `wordpress-develop` or when pull requests are opened where forks and mirrors are the base repository.
Because a Dependabot configuration is present in the repository, it cannot be turned off for mirrors. This results in workflows running for all Dependabot PRs, which is problematic for private mirrors and needlessly consumes minutes and resources.
Props swissspidy, johnbillion.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@60080 602fd350-edb4-49c9-b593-d223f7449a82
This expands the use of Dependabot to also manage npm dependencies by configuring several groups of related packages. After [59983], pull requests for the majority of these updates can now be staged without encountering test failures.
Props joemcgill, peterwilsoncc, swissspidy, johnbillion.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@60066 602fd350-edb4-49c9-b593-d223f7449a82
Without this, workflow runs are not triggered by commits made by the workflow.
Follow up to [59983], [60052], [60059], [60063], [60064].
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@60065 602fd350-edb4-49c9-b593-d223f7449a82
This reworks the workflow files introduced in [59983] to eliminate the need for a custom app token.
Follow up to [59983], [60052], [60059].
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@60063 602fd350-edb4-49c9-b593-d223f7449a82
This switches to using the `wordpress-develop-pr-bot` GitHub app when authoring commits instead of masquerading as Dependabot.
Follow up to [59983], [60052].
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@60059 602fd350-edb4-49c9-b593-d223f7449a82
Because of how dependent jobs and queuing works in GitHub Actions, it’s common for workflows to be completed with the exception of sending Slack notifications.
“The waiting is the hardest part”, and occasionally these jobs hit the `10` minute timeout value before their turn comes up.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@60053 602fd350-edb4-49c9-b593-d223f7449a82
Because `pull_request_target` happens in the context of the base branch, attempting to checkout `github.head_ref` results in a failure when the workflow comes from a fork.
This adjusts the options passed to `actions/checkout` to use the repository that actually contains the test branch.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@60052 602fd350-edb4-49c9-b593-d223f7449a82
This updates the following 3rd party actions:
- `actions/setup-node` from `4.2.0` to `4.3.0`
- `actions/upload-artifact` from `4.6.0` to `4.6.1`
- `ramsey/composer-install` from `3.0.0` to `3.1.0`
- `actions/cache` from `4.2.0` to `4.2.2`
- `actions/download-artifact` from `4.1.8` to `4.1.9`
- `codecov/codecov-action` from `5.3.1` to `5.4.0`
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@60051 602fd350-edb4-49c9-b593-d223f7449a82
This is a recommended best practice for hardening workflows that are utilizing 3rd party actions.
Follow up to [59679].
Props johnbillion.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@60050 602fd350-edb4-49c9-b593-d223f7449a82
In older branches utilizing Puppeteer instead of Playwright, installing Playwright browsers is unnecessary and resulting in workflow failures.
This introduces a new `install-playwright` input that allows older branches to indicate that Playwright related steps should be skipped.
See #63117.
git-svn-id: https://develop.svn.wordpress.org/trunk@60005 602fd350-edb4-49c9-b593-d223f7449a82
The reusable E2E workflow does not yet follow the `-v#` pattern because there is only one version.
The current pattern is not matching the `reusable-end-to-end-tests.yml` file.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@60004 602fd350-edb4-49c9-b593-d223f7449a82
There are several files generated and updated by the build process that are under version control. Including changes to these files is a common missed step for contributors regardless of experience level.
This introduces a workflow that checks for changes to versioned files as a result of other changes in pull requests and commits them back to the head branch. Because this workflow requires the `pull_request_target` event instead of `pull_request`, local references to reusable workflows should never be used.
In addition to improving the contributor experience, this also opens the door to use Dependabot for monitoring npm dependencies, many of which produce changes to built files when updating.
Props desrosj, johnbillion, joemcgill, swissspidy.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@59983 602fd350-edb4-49c9-b593-d223f7449a82
This adds the `new-version` input to the concurrency group name to prevent manually dispatched workflow runs from cancelling each other when different versions are being tested.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@59973 602fd350-edb4-49c9-b593-d223f7449a82
The `WP_Error::has_errors()` method was introduced in WordPress 5.1, so this change uses its internal logic instead to remain compatible with earlier versions.
Props swissspidy, joemcgill, desrosj.
Fixes#63052
git-svn-id: https://develop.svn.wordpress.org/trunk@59956 602fd350-edb4-49c9-b593-d223f7449a82
This JSON decoding is no longer needed since the commit message was converted to a plain string in r59920. The commit message can now be treated as a plain text string in an environment variable throughout the workflow.
Props johnbillion.
See #62221
git-svn-id: https://develop.svn.wordpress.org/trunk@59922 602fd350-edb4-49c9-b593-d223f7449a82
This escaping is no longer needed since all instances of inline expressions were removed from workflows in r59679. The commit message can now be treated as a plain text string in an environment variable throughout the workflow.
Props johnbillion, swissspidy
Unprops johnblackbourn
See #62221
git-svn-id: https://develop.svn.wordpress.org/trunk@59920 602fd350-edb4-49c9-b593-d223f7449a82
The test suite when run on PHP 8.4 with MySQL is currently taking 2-3x the amount of time to run. The jobs are regularly hitting the conservative `20` minute time out configured to prevent runaway jobs.
While this performance regression is investigated, this increases the timeout value to `30` to avoid running into unnecessary failures now that the issue has been discovered.
Props johnbillion.
See #63026.
git-svn-id: https://develop.svn.wordpress.org/trunk@59873 602fd350-edb4-49c9-b593-d223f7449a82
This complements the existing workflow which tests upgrading to an already released version.
Props johnbillion, peterwilsoncc, mukesh27, desrosj, audrasjb, joemcgill.
See #62221
git-svn-id: https://develop.svn.wordpress.org/trunk@59815 602fd350-edb4-49c9-b593-d223f7449a82
This change introduces a job matrix for the "current", "before", and "base" performance tests to replace the current behaviour of running them sequentially in a single job. This speeds up the overall performance testing workflow and also reduces the chance of any given test interfering with another, for example by making a change to data in the database that affects a subsequent test.
Props johnbillion, swissspidy, dmsnell, joemcgill.
See #62221
git-svn-id: https://develop.svn.wordpress.org/trunk@59749 602fd350-edb4-49c9-b593-d223f7449a82
The Root Certificate bundle maintained by Mozilla ships in WordPress to allow SSL certificates to be verified on hosts with incomplete, outdated, or invalid local SSL configurations. To date, updates have only been merged into Core when problems arise using a highly manual process.
This introduces the `certificates:upgrade` Grunt task to automate the process of updating the included bundle with upstream changes using Composer to manage versioning.
The legacy 1024bit certificates included for backwards compatibility are now maintained in a separate file that is prepended to the built version of the bundle during the relevant Grunt tasks. Some expired certificates from this list have been removed:
- Cybertrust Global Root (expired 2021-12-15)
- Thawte Server CA (expired 2020-12-31)
- Thawte Premium Server CA (expired 2020-12-31)
The Dependabot configuration has also been updated to open pull requests when new releases occur upstream. Going forward, the recommendation is to create a task ticket for updating these certificates with each release when an update is published. See #62811 for an example of this.
Props johnbillion, desrosj, whyisjake, ayeshrajans, SergeyBiryukov, swissspidy, skithund, barry.
Fixes#62812. See #62811, 50828.
git-svn-id: https://develop.svn.wordpress.org/trunk@59740 602fd350-edb4-49c9-b593-d223f7449a82
Because the build process test workflow accepts an input for runner image, older workflows still use `ubuntu-latest`. This adjusts a conditional check to be more broad, allowing any `ubuntu-` image to match.
Follow up to [59720].
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@59722 602fd350-edb4-49c9-b593-d223f7449a82
While using the `ubuntu-latest`, `macos-latest`, and `windows-latest` runner image tags is convenient, it has proven to be problematic in a number of instances as the runners are slowly updated (see #62808 and #62843).
This switches all workflows to using specific version tags representing the latest non-preview versions, which currently are as follows:
- `ubuntu-24.04`
- `windows-2022`
- `macos-14`
Props swissspidy, johnbillion.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@59720 602fd350-edb4-49c9-b593-d223f7449a82
The input for providing files to the `codecov/codecov-action` was changed from `file` to `files` in version `5.0.0`.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@59717 602fd350-edb4-49c9-b593-d223f7449a82
This updates the following GitHub Actions to their latest versions:
- `actions/cache`
- `actions/checkout`
- `actions/setup-node`
- `actions/upload-artifact`
- `codecov/codecov-action`
- `shivammathur/setup-php`
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@59716 602fd350-edb4-49c9-b593-d223f7449a82
Prior to r59679 this value was echoed to GitHub output which meant that its surrounding double quotes lost their significance. Now this value is used directly in the job output it needs to be treated as a plain string.
This concludes the conclusion confusion.
See #82221
git-svn-id: https://develop.svn.wordpress.org/trunk@59693 602fd350-edb4-49c9-b593-d223f7449a82
The JSON string set as an output for the Slack message payload needs to be one line to prevent causing errors. This ensures `jq` returns a compact JSON string.
Follow up to [59679].
Props johnbillion.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@59681 602fd350-edb4-49c9-b593-d223f7449a82
This includes removing use of dangerous inline GitHub Actions expressions, preventing word splitting, further tightening permissions, and generally improving many aspects of the workflows.
This also introduces a new workflow that runs Actionlint to detect incorrect and insecure code and configuration in workflow files.
Props johnbillion, swissspidy, flixos90, desrosj.
See #62221
git-svn-id: https://develop.svn.wordpress.org/trunk@59679 602fd350-edb4-49c9-b593-d223f7449a82
The benefit of this is that when PRs are made to make changes to a reusable workflow, the references doesn't need to be updated to point to the fork in order for the changed workflow to run.
A `npm run grunt replace:workflow-references-local-to-remote` command has also been introduced in order to convert these local references back to remote ones. This command can be used to switch release branches over to using remote workflows, as they are currently, so they continue to benefit from workflow changes in trunk without the need for continual backporting to all the branches.
Props desrosj, johnbillion
Fixes#62416
git-svn-id: https://develop.svn.wordpress.org/trunk@59673 602fd350-edb4-49c9-b593-d223f7449a82
There are currently ~2,000 open pull requests on GitHub for `wordpress-develop`. Many of these were for testing changes that have already been merged.
To help prevent orphaned pull requests, this new workflow will search for any pull requests referencing the `Fixed` Trac tickets as noted in the commit message and close them out. For now, this only happens for `push` events.
Props peterwilsoncc, swissspidy, johnbillion, davidbaumwald.
Fixes#62817.
git-svn-id: https://develop.svn.wordpress.org/trunk@59661 602fd350-edb4-49c9-b593-d223f7449a82
Old branches requiring outdated versions of Chromium to run JavaScript tests have recently started failing as a result of the `ubuntu-latest` container being updated to point to `ubuntu-24`.
This introduces a new input to the reusable JavaScript testing workflow to allow a fix to be used without having to update Chromium or tests in these branches.
Props swissspidy.
See #62808.
git-svn-id: https://develop.svn.wordpress.org/trunk@59635 602fd350-edb4-49c9-b593-d223f7449a82
The latest LTS version of MariaDB is 11.4, which is now included in the test matrix.
This changeset also expands the test matrix to include all LTS versions of MariaDB with > 1% of usage on WordPress sites in the wild as reported by the stats page on WordPress.org. Though a few of these are unsupported upstream, they are still supported in WordPress itself.
MariaDB 5.5 is also included in the new matrix. Because it was intended as a drop-in replacement to MySQL at the time, this also brings some MySQL 5.5 testing into the matrix. This has not been regularly tested against since specific database versions were included due to the lack of a working Docker container.
Props johnbillion, jorbin.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@59587 602fd350-edb4-49c9-b593-d223f7449a82
MariaDB also follows the innovation release model. This adds testing for these releases to the test matrix and moves innovation versions to a new job in order to more clearly differentiate from LTS ones.
The current innovation release for MariaDB is `11.6`.
Props johnbillion, jorbin.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@59586 602fd350-edb4-49c9-b593-d223f7449a82
Run tests against Multisite (possible since [58097]) and on single post pages. Also improve cache flushes/resets between iterations.
Props swissspidy, flixos90, desrosj, mukesh27.
Fixes#62725.
git-svn-id: https://develop.svn.wordpress.org/trunk@59577 602fd350-edb4-49c9-b593-d223f7449a82
The fix did not work properly and is causing performance data for commits to not be sent at all. It is therefore reverted until a proper solution has been implemented.
See #62766.
git-svn-id: https://develop.svn.wordpress.org/trunk@59571 602fd350-edb4-49c9-b593-d223f7449a82
None of the steps in any of the workflows use svn, so this debugging step is unnecessary, and svn has been removed in the ubuntu-24.04 runner which will be rolling out to GitHub Actions imminently.
See #62221
git-svn-id: https://develop.svn.wordpress.org/trunk@59534 602fd350-edb4-49c9-b593-d223f7449a82
There should be inline documentation anytime a strategy matrix has an `exclude` combination configured so that contributors have proper context as to why it’s there.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@59531 602fd350-edb4-49c9-b593-d223f7449a82
This adds an input to the Test Old Branches workflow that allows a specific branch to be specified or `all` to run all old branches.
The default behavior is to only test the currently supported version of WordPress as defined in the `CURRENTLY_SUPPORTED_BRANCH` environment variable.
Follow up to [59520].
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@59529 602fd350-edb4-49c9-b593-d223f7449a82