Repository navigation
Build/Test Tools: Introduce selective default theme testing and packaging - #15196
himanshupathak95 wants to merge 3 commits into
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. 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. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the selective theme-testing and packaging workflow changes.
No open issues 🎉
What changed in this PR
Adds selective default-theme testing and packaging to the existing workflow. Manual runs can target one theme or all; push and pull request runs continue to process all themes.
Changes:
- Adds a theme selector and validates selections in a matrix-generation job.
- Derives check, build, and packaging matrices from the selected themes.
- Allows packaging when no build is needed, while blocking it after failed checks or cancellation.
| File | Description |
|---|---|
.github/workflows/test-and-zip-default-themes.yml |
Adds theme selection, dynamic matrices, and updated packaging and notification dependencies. |
Review effort: Balanced
lancewillett
left a comment
There was a problem hiding this comment.
The selector preserves all-theme runs and correctly limits manual runs to one theme. I executed every theme choice and the default/invalid-input cases locally, and verified the three fork runs against the PR workflow (only the repository gates differ). Both build and non-build selections package successfully. actionlint passes; zizmor reports no new findings versus trunk. Current CI and Copilot review are clear.
AI review · gpt-6
|
@lucatume @adimoldovan could you take a look at this approach before we land it? It adds a single-theme selector for manual runs, keeps all-theme checks for automatic runs, and allows packaging when a selected theme has no build step. Local checks and CI pass; I’m holding this for another review of the workflow and release-packaging behavior. |
adimoldovan
left a comment
There was a problem hiding this comment.
I would change two things:
-
Picking a theme that does not exist on the chosen branch gives a green run with no ZIP. For example picking
twentytwentyfiveon6.6- every job skips its steps and passes.bundle-themeshould fail instead. -
The concurrency label should be updated to include the
input.theme. Runs with different themes started one after another will cancel each other. Adding the inputs to the group key fixes it, e.g.${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}-${{ inputs.branch }}-${{ inputs.theme }}.
|
Addressed both requests in bafe37c:
Actionlint and shell syntax checks passed. Controlled before/after checks confirmed the missing-theme failure, valid selections, preserved all-theme/automatic behavior, and concurrency separation. These used local filesystem fixtures and expression evaluation; no full hosted workflow was dispatched. @adimoldovan, please re-review the fixes. Copilot re-review has also been requested. AI review · |
Trac ticket: https://core.trac.wordpress.org/ticket/66405
The default theme workflow currently checks and packages every theme, even when a release needs only one. This PR adds a theme selector to manual runs, defaulting to
all, and derives the check, build, and packaging matrices from that selection. Push and pull request runs continue to process all themes.Themes without build scripts skip the build job and remain eligible for packaging after successful checks. Invalid selections fail explicitly, and failed checks or cancelled runs prevent packaging.
Testing (on my own fork)
twentytwenty) Only 1 empty-file check, 1 build job, and 1 zip produced (twentytwenty.zip)twentyseventeen) Build job is skipped cleanly, and twentyseventeen.zip is produced.all) All 16 themes are checked, built, and zipped.Use of AI Tools
Implemented with assistance of Codex (Astra 6)