Skip to content

Build/Test Tools: Trim the routine PHPUnit database matrix - #13447

Open
lancewillett wants to merge 2 commits into
WordPress:trunkfrom
lancewillett:chore/trim-phpunit-database-matrix
Open

Build/Test Tools: Trim the routine PHPUnit database matrix#13447
lancewillett wants to merge 2 commits into
WordPress:trunkfrom
lancewillett:chore/trim-phpunit-database-matrix

Conversation

@lancewillett

@lancewillett lancewillett commented Sep 8, 2026

Copy link
Copy Markdown
Member

Trac ticket: https://core.trac.wordpress.org/ticket/66069

Reduce the database versions tested on pushes, pull requests, and manual runs. Keep the complete database lists on the weekly schedule, following the existing PHP matrix pattern.

  • MySQL: retain 5.7, 8.0, and 8.4 on routine runs; test 9.7 weekly.
  • MariaDB: retain 5.5, 10.6, 10.11, 11.4, and 11.8 on routine runs; test 10.3 and 10.5 weekly.

Routine runs drop from 86 to 68 jobs (21% fewer); weekly runs remain at 182. These totals include shared Gutenberg preparation and exclude notification and failure-handling jobs. Memcached, alternate-domain, reporting, HTML API, innovation-release, and PHP prerelease configurations are preserved.

Label-triggered full-matrix runs on PRs are tracked separately in https://core.trac.wordpress.org/ticket/66071.

Validation

  • actionlint .github/workflows/phpunit-tests.yml
  • uvx --offline zizmor@1.24.1 --persona=regular --offline .github/workflows/phpunit-tests.yml
  • Expanded the before/after matrices for push, pull request, manual, and scheduled events. Confirmed 86 → 68 for each routine event and 182 → 182 weekly; every retained job configuration matches exactly, including reporting and other additional configurations.

Use of AI tools

AI assistance: Yes
Tool(s): Codex
Model(s): GPT-6, GPT-5.6
Used for: Workflow edits, matrix validation, code review, and drafting this description. I take responsibility for the submitted change.


This pull request is for code review only. Please keep other discussion in the Trac ticket. Do not merge this pull request.

@github-actions

github-actions Bot commented Sep 8, 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. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props lancewillett, lucatume.

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

@lancewillett
lancewillett requested review from aaronjorbin, adimoldovan, desrosj, johnbillion and lucatume and a lite review from Copilot September 8, 2026 17:38
@lancewillett lancewillett changed the title Build/Test Tools: Trim the routine PHPUnit database matrix. Build/Test Tools: Trim the routine PHPUnit database matrix Sep 8, 2026
@lancewillett lancewillett moved this from Backlog to In review in WordPress Project Build Tooling Sep 8, 2026
@lancewillett lancewillett self-assigned this Sep 8, 2026

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

The workflow logic change is straightforward and consistent with the existing scheduled-vs-routine matrix pattern, with only a minor comment wording clarification suggested.

Pull request overview

This PR updates the PHPUnit GitHub Actions workflow to reduce the routine database-version test matrix for MySQL and MariaDB while keeping the full matrix on the weekly scheduled run, aligning database coverage with the existing “full on schedule, trimmed otherwise” PHP matrix pattern.

Changes:

  • Switch MySQL db-version to a scheduled full list vs. trimmed list for push/PR/manual runs.
  • Switch MariaDB db-version to a scheduled full list vs. trimmed list for push/PR/manual runs.
  • Minor comment reflow/clarification around the MariaDB matrix documentation.
File summaries
File Description
.github/workflows/phpunit-tests.yml Trims routine MySQL/MariaDB DB-version matrices while preserving the full weekly scheduled matrix.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/phpunit-tests.yml Outdated
php: ${{ github.event_name == 'schedule' && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }}
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0', '8.4', '9.7' ]
# The scheduled run tests the full database matrix. Other events test the oldest listed version and supported LTS releases.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated the comment and routine MySQL selection in 6edd6f8. Routine runs now use 5.7, 8.0, and 8.4. One factual correction: MySQL 9.7 is an LTS release; the revised comment explains the coverage choice without misclassifying it.


Adversarial review · gpt-6

@lucatume lucatume 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 retouch the versions to match current usage, the MariaDB version suggestion is not blocking.

Comment thread .github/workflows/phpunit-tests.yml Outdated
Comment on lines +116 to +117
# The scheduled run tests the full database matrix. Other events test the oldest listed version and supported LTS releases.
db-version: ${{ github.event_name == 'schedule' && fromJSON('["5.7","8.0","8.4","9.7"]') || fromJSON('["5.7","8.4","9.7"]') }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

MySQL 9.7 is 0.022% of reported installs and it isn't an LTS, so the new comment doesn't quite describe it either. 8.0 is 14.07%, the most used MySQL version there is; it's the one going weekly.

Swapping the two is free, same job count, and routine coverage goes from 63.8% to 77.9%.

Suggested change
# The scheduled run tests the full database matrix. Other events test the oldest listed version and supported LTS releases.
db-version: ${{ github.event_name == 'schedule' && fromJSON('["5.7","8.0","8.4","9.7"]') || fromJSON('["5.7","8.4","9.7"]') }}
# The scheduled run tests the full database matrix. Other events test the oldest listed version, the most used release and the most recent LTS.
db-version: ${{ github.event_name == 'schedule' && fromJSON('["5.7","8.0","8.4","9.7"]') || fromJSON('["5.7","8.0","8.4"]') }}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Applied the swap in 6edd6f8: routine MySQL runs use 5.7, 8.0, and 8.4, with 9.7 retained in the weekly matrix. The comment now describes the compatibility and deployment-coverage rationale.


Adversarial review · gpt-6

Comment thread .github/workflows/phpunit-tests.yml Outdated
Comment on lines +209 to +210
# The scheduled run tests the full database matrix. Other events test the oldest listed version and supported LTS releases.
db-version: ${{ github.event_name == 'schedule' && fromJSON('["5.5","10.3","10.5","10.6","10.11","11.4","11.8"]') || fromJSON('["5.5","10.11","11.4","11.8"]') }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

10.6 is 9.67% of installs, second only to 10.11 among the versions this job runs. It moves to the weekly run while 5.5 at 0.311% stays per-push.

This one isn't free: +6 jobs, so 86 -> 68 rather than 86 -> 62. Routine coverage goes to 87.6% and a 10.6 only regression doesn't sit on trunk until Sunday.

Suggested change
# The scheduled run tests the full database matrix. Other events test the oldest listed version and supported LTS releases.
db-version: ${{ github.event_name == 'schedule' && fromJSON('["5.5","10.3","10.5","10.6","10.11","11.4","11.8"]') || fromJSON('["5.5","10.11","11.4","11.8"]') }}
# The scheduled run tests the full database matrix. Other events test the oldest listed version and the most used releases.
db-version: ${{ github.event_name == 'schedule' && fromJSON('["5.5","10.3","10.5","10.6","10.11","11.4","11.8"]') || fromJSON('["5.5","10.6","10.11","11.4","11.8"]') }}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added MariaDB 10.6 to routine runs in 6edd6f8. Matrix expansion confirms 68 routine jobs, down from 86, and the same 182 weekly jobs. Reporting, memcached, alternate-domain, innovation, and PHP prerelease configurations are unchanged. Updated the PR description with the new lists and counts.


Adversarial review · gpt-6

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.

3 participants