Skip to content

Build/Test Tools: Introduce selective default theme testing and packaging - #15196

Open
himanshupathak95 wants to merge 3 commits into
WordPress:trunkfrom
himanshupathak95:fix/66405-single-theme
Open

himanshupathak95 wants to merge 3 commits into
WordPress:trunkfrom
himanshupathak95:fix/66405-single-theme

Conversation

@himanshupathak95

@himanshupathak95 himanshupathak95 commented Oct 30, 2026 •

Copy link
Copy Markdown

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)

  1. Build Theme - (twentytwenty) Only 1 empty-file check, 1 build job, and 1 zip produced (twentytwenty.zip)
Screenshot 2026-10-30 at 15 00 49
  1. Non-Build Theme - (twentyseventeen) Build job is skipped cleanly, and twentyseventeen.zip is produced.
Screenshot 2026-10-30 at 15 07 07
  1. Full Suite - (all) All 16 themes are checked, built, and zipped.
Screenshot 2026-10-30 at 15 09 44 Screenshot 2026-10-30 at 15 10 02

Use of AI Tools

Implemented with assistance of Codex (Astra 6)

@himanshupathak95
himanshupathak95 marked this pull request as ready for review October 30, 2026 09:42
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

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:

Props abcd95, lancewillett, adrianmoldovanwp.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 lancewillett left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@lancewillett

Copy link
Copy Markdown
Member

@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 adimoldovan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change two things:

  1. Picking a theme that does not exist on the chosen branch gives a green run with no ZIP. For example picking twentytwentyfive on 6.6 - every job skips its steps and passes. bundle-theme should fail instead.

  2. 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 }}.

@lancewillett
lancewillett self-requested a review October 31, 2026 16:15
@lancewillett
lancewillett requested review from adimoldovan and a balanced review from Copilot October 31, 2026 21:38
@lancewillett

Copy link
Copy Markdown
Member

Addressed both requests in bafe37c:

  • bundle-theme fails when an explicitly selected theme is absent from the chosen branch. all and automatic runs still skip themes absent from older branches.
  • Concurrency now includes branch and theme inputs, so different selections do not cancel each other.

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 · gpt-6

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the selective theme testing and packaging changes.

No open issues 🎉

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

4 participants