You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow commit message and revision to be passed through an environment variable #136
WordPress Core currently runs PHPUnit tests in two steps.
The first step checks out the WordPress repo, installs NPM, builds WP for use, and then zips everything to upload as an artifact on the workflow run. After that, individual jobs are created for various PHP/Memcached combinations to run the PHPUnit tests by downloading the previously built artifact. This prevents every job from needing to perform these steps.
However, the .git folder is not packaged and included in the artifact to save space (and it's no longer needed anyway).
When the test reporter submits results, it scans for .git and .svn directories to grab the commit message and revision number to associate the results with. In order for this to work successfully, the Git repo needs to be reconnected to the codebase (see Core revision 49786).
If the runner first checked for environment variables and fell back to searching for those directories as a second option, that information could be passed to the reporter without having to reestablish the directory as a Git repository.
I checked whether this still applies, since the report is from the artifact-based workflow core used in 2020.
Core removed that artifact hand-off in 4ab922d224 (February 2021): each PHPUnit job checks out the repository directly, and today's reusable workflow still does (it even runs git diff --exit-code right before the report step, so .git is present in the workspace the container mounts at /var/www). The PHP images used by core's Docker environment ship git, and the GitHub mirror commits carry the git-svn-id: line that report.php reads.
The current behavior confirms it. In core's trunk run from 2026-09-14, the "PHP 8.5 / MySQL 8.4 (test reporting enabled)" job logged "Getting SVN Revision", "Getting SVN message", and then uploaded https://make.wordpress.org/hosting/test-results/r63618/wpdevbot-r63618-8-5-unknown/. The reporter stores the submitted message as the revision post title, and that report shows the expected commit subject, so both the revision and the message reach the reporter without any environment variable. The documented runner path (prepare.php always clones) and the current core CI path both have a git checkout available when report.php runs.
I think this can be closed as resolved by the core workflow change. If a host runs the reporter against a git-less tree, an environment override with the git lookup as fallback would still be a small change, so shout if that setup exists.
Activity
getsource commentedon Dec 11, 2020
Thanks for the report!
Using environment variables to work around this makes sense to me.
ekamran commentedon Sep 29, 2026
I checked whether this still applies, since the report is from the artifact-based workflow core used in 2020.
Core removed that artifact hand-off in 4ab922d224 (February 2021): each PHPUnit job checks out the repository directly, and today's reusable workflow still does (it even runs
git diff --exit-coderight before the report step, so.gitis present in the workspace the container mounts at/var/www). The PHP images used by core's Docker environment shipgit, and the GitHub mirror commits carry thegit-svn-id:line thatreport.phpreads.The current behavior confirms it. In core's trunk run from 2026-09-14, the "PHP 8.5 / MySQL 8.4 (test reporting enabled)" job logged "Getting SVN Revision", "Getting SVN message", and then uploaded https://make.wordpress.org/hosting/test-results/r63618/wpdevbot-r63618-8-5-unknown/. The reporter stores the submitted message as the revision post title, and that report shows the expected commit subject, so both the revision and the message reach the reporter without any environment variable. The documented runner path (
prepare.phpalways clones) and the current core CI path both have a git checkout available whenreport.phpruns.I think this can be closed as resolved by the core workflow change. If a host runs the reporter against a git-less tree, an environment override with the git lookup as fallback would still be a small change, so shout if that setup exists.