Build/test tools: run test-old-branches on the security mirror (checks only, no Slack) - #12698
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Pull request overview
Updates the test-old-branches.yml GitHub Actions workflow guard conditions so it runs not only on the public WordPress/wordpress-develop repository, but also on the private security mirror WordPress/wordpress-develop-security, enabling the same cross-branch coverage for security backport branches.
Changes:
- Expand the repository-name
if:guard ondispatch-workflows-for-old-branchesto allow the security mirror. - Expand the repository-name
if:guard onslack-notificationsto allow the security mirror (while preserving the existingpull_requestexclusion andalways()behavior).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c92c3d1 to
887d1f4
Compare
The dispatch job's guard restricts it to the canonical public repository, so it never runs on the private security mirror and backport branches get no cross-branch CI. Extend that guard to also allow WordPress/wordpress-develop-security. The Slack notification job is left public-only on purpose: the mirror runs the tests and reports per-branch results, but does not post to the public Slack channel. See #64893. Props lance.willett@automattic.com
887d1f4 to
0ca85d7
Compare
adimoldovan
left a comment
There was a problem hiding this comment.
test-old-branches.yml dispatches other workflows and each has their own guard:
coding-standards.yml#L58javascript-tests.yml#L61phpunit-tests.yml#L70test-build-processes.yml#L57php-compatibility.yml#L50end-to-end-tests.yml#L65performance.yml#L59
All still github.repository == 'WordPress/wordpress-develop'
Those guards need updating too, but in a separate PR — test-old-branches.yml only exists on trunk, while the dispatched workflows live on every branch:
- This PR — trunk only, nothing to backport.
- Follow-up — the seven workflows above, on trunk + backported to 7.0…4.7.
| actions: write | ||
| timeout-minutes: 20 | ||
| if: ${{ github.repository == 'WordPress/wordpress-develop' }} | ||
| if: ${{ github.repository == 'WordPress/wordpress-develop' || github.repository == 'WordPress/wordpress-develop-security' }} |
There was a problem hiding this comment.
We probably don't want it to run on push and schedule in the mirror repo.
| if: ${{ github.repository == 'WordPress/wordpress-develop' || github.repository == 'WordPress/wordpress-develop-security' }} | |
| if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.repository == 'WordPress/wordpress-develop-security' && github.event_name == 'workflow_dispatch' ) |
Trac ticket: https://core.trac.wordpress.org/ticket/64893
Summary
test-old-branches.ymlrestricts its dispatch job togithub.repository == 'WordPress/wordpress-develop', so it only runs on the canonical public repository. This extends that one guard to also allow the private security mirror (WordPress/wordpress-develop-security), so backport branches there get the same cross-branch test coverage. The Slack notification job is deliberately left public-only, so the mirror runs the tests without posting to the public channel. The public repository's behavior is unchanged.Why
Security backport branches are prepared on the private mirror, which shares this workflow file but is excluded by the repo-name guard. As a result the suite never runs across old branches there, and a missed backport can ship without a red test. Enabling the dispatch job closes that gap; the per-branch results are visible as checks without a Slack alert.
Guard expression
Two options enable a private mirror: the explicit repository name (used here) or
github.event.repository.private.test-old-branches.ymlruns on pushes totrunkthat change its workflow files, twice-monthly schedules, and manualworkflow_dispatchevents. Becausegithub.event.repositoryis not reliably populated on schedule events, the explicit-name form is used for reliability. Happy to switch to the private-flag form if preferred.Testing
actionlintpasses on the changed workflow.git diff --checkpasses.if:guard; the Slack notification job's guard is untouched.