The wordpress-develop repository on GitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/ has two workflows that test a handful of scenarios related to updating or installing a WordPress site:
Currently they confirm that there are no errors while upgrading from previous versions of WordPress or installing a new site followed by a series of smoke tests, but there are plans to expand these to cover more scenarios and types of testing.
During a typical release, both workflows are run manually by a contributor with high enough privileges to do so. However, this is often missed, and is very tedious when dozens of security updates are being released. The workflows also can only test an upcoming release after the packages for a given version are generated and published to WordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ because they rely on downloading WordPress using WP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/.
Could a workflow dispatch request be added to w.org that is sent after packages for a release have been built and pushed to wordpress.org so that this happens automatically? As an example, I believe that something like this using curl is all that’s required for upgrade-testing.yml:
curl --fail-with-body --silent --show-error \
--request POST \
--url "https://api.github.com/repos/WordPress/wordpress-develop/actions/workflows/upgrade-testing.yml/dispatches" \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer ${GH_DISPATCH_TOKEN}" \
--header "Content-Type: application/json" \
--data '{
"ref": "trunk",
"inputs": {
"new-version": "${NEWLY_PACKAGED_VERSION}"
}
}'
For install-testing.yml, the inputs are slightly different:
curl --fail-with-body --silent --show-error \
--request POST \
--url "https://api.github.com/repos/WordPress/wordpress-develop/actions/workflows/install-testing.yml/dispatches" \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer ${GH_DISPATCH_TOKEN}" \
--header "Content-Type: application/json" \
--data '{
"ref": "trunk",
"inputs": {
"wp-version": "${NEWLY_PACKAGED_VERSION}"
}
}'
The GH_DISPATCH_TOKEN would ideally be configured through a GitHub App, but a fine-grained personal access token would also work if that’s not an option.
Thanks!
#prio2