Make WordPress Core

Opened 2 months ago

Closed 2 months ago

Last modified 8 weeks ago

#66071 closed enhancement (fixed)

Build/Test Tools: Run the full PHPUnit matrix on pull requests using a label

Reported by: lancewillett Owned by: lancewillett
Priority: normal Milestone: 7.2
Component: Build/Test Tools Version:
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses:

Description (last modified by lancewillett)

Allow authors and reviewers to request the full PHPUnit matrix on wordpress-develop pull requests by adding a GitHub label, with results visible on the PR. The existing PHPUnit path filters still apply; documentation-only changes do not need the full matrix.

#65736 reduced the PHP versions tested on routine runs. #66069 proposes the same approach for database versions. Both retain full coverage in the weekly scheduled run.

Shared GitHub Actions results let authors and reviewers inspect full-matrix evidence for a particular PR before it lands, without reproducing the matrix locally.

Proposed behavior

Use a dedicated label, provisionally Full PHPUnit Matrix, in the existing PHPUnit workflow.

  • Adding the label starts a full-matrix run for the PR's current revision without requiring another code push.
  • Use the same PHP and database combinations, single site and multisite coverage, and additional configurations as the weekly run.
  • Identify full-matrix runs in GitHub Actions, with checks and logs accessible from the PR.
  • New commits use the full matrix while the label remains. Remove and reapply it to request another run for the current revision.
  • Remove the label to return subsequent runs to the reduced matrix.
  • Preserve existing path filters, fork approval requirements, and workflow permissions.
  • Keep the weekly full run in place.

Contributor access

GitHub requires triage access to apply labels:
​https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels#applying-a-label

Contributors who cannot apply labels can leave a PR comment asking a reviewer with triage access to add the label. Keep this request process manual for now, pending feedback.

This is a companion to #66069; implementing the label trigger is separate from trimming the database matrix.

Use of AI tools: Codex assisted with reviewing the workflow and drafting this ticket.

Change History (9)

#1 @lancewillett
2 months ago

  • Description modified (diff)

This ticket was mentioned in ​PR #13448 on ​WordPress/wordpress-develop by ​@lancewillett.


2 months ago
#2

  • Keywords has-patch has-unit-tests added

Adding the Full PHPUnit Matrix label starts the weekly PHP and database matrix on an eligible PR without another code push. New commits keep using the full matrix while the label remains. Runs appear as PHPUnit Tests (full matrix) in GitHub Actions, with checks and logs on the PR.

This extends the existing PHPUnit workflow and preserves its path filters, permissions, and fork approval requirements. Documentation-only changes remain excluded. Contributors without label access can ask a reviewer to apply it in a PR comment.

Unrelated label events skip tests and use a separate concurrency group so they cannot cancel active runs. Removing the label returns subsequent runs to the reduced matrix; removing and reapplying it requests another full run.

Depends on #13447 (https://core.trac.wordpress.org/ticket/66069). This branch includes that database trim; land #13447 first. The label change itself modifies only the existing workflow and PHPUnit README.

Validation: actionlint, zizmor, and git diff --check passed. Matrix expansion confirmed 62 ordinary jobs and 182 full jobs, including Gutenberg preparation. Labeled and scheduled matrix rows match exactly. Reviewed event selection and concurrency for label addition, subsequent commits, and unrelated labels. Live GitHub Actions validation is pending.

Use of AI tools: Codex (GPT-6 and GPT-5.6) assisted with implementation and review.

#3 @lancewillett
2 months ago

  • Owner set to lancewillett
  • Resolution → fixed
  • Status new → closed

In 63585:

Build/Test Tools: Run the full PHPUnit matrix by label.

Allow reviewers to trigger the weekly PHP and database matrix on eligible pull requests by adding the Full PHPUnit Matrix label. Keep full coverage on subsequent commits while the label remains.

Use a separate label-triggered workflow so unrelated labels do not replace PHPUnit checks or cancel active runs. Preserve the existing path filters and document the manual request process for contributors without label access.

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/13448

Props lucatume, adrianmoldovanwp.
Fixes #66071.

#4 @lancewillett
2 months ago

  • Milestone Awaiting Review → 7.2

#6 @lancewillett
8 weeks ago

In 63891:

Build/Test Tools: Trim PHPUnit runs in 7.1.

Keep boundary PHP versions and a reduced database matrix for routine runs. Restore the full PHP and database lists for dispatched runs and pull requests with the Full PHPUnit Matrix label.

Merges [63584], [63585], and [63779] to the 7.1 branch, adapted to its supported versions and scheduled dispatches.

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/13637

Reviewed by: desrosj.
Props adrianmoldovanwp, desrosj, lucatume.
See #66071.
See #66069.

#7 @lancewillett
8 weeks ago

In 63892:

Build/Test Tools: Trim PHPUnit runs in 7.0.

Keep boundary PHP versions and a reduced database matrix for routine runs. Restore the full PHP and database lists for dispatched runs and pull requests with the Full PHPUnit Matrix label.

Merges [63584], [63585], and [63779] to the 7.0 branch, adapted to its supported versions and scheduled dispatches.

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/13638

Reviewed by: desrosj.
Props adrianmoldovanwp, desrosj, lucatume.
See #66071.
See #66069.

#8 @lancewillett
8 weeks ago

In 63893:

Build/Test Tools: Trim PHPUnit runs in 6.9.

Keep boundary PHP versions and a reduced database matrix for routine runs. Restore the full PHP and database lists for dispatched runs and pull requests with the Full PHPUnit Matrix label.

Merges [63584], [63585], and [63779] to the 6.9 branch, adapted to its supported versions and scheduled dispatches.

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/13639

Reviewed by: desrosj.
Props adrianmoldovanwp, desrosj, lucatume.
See #66071.
See #66069.

#9 @lancewillett
8 weeks ago

In 63894:

Build/Test Tools: Trim PHPUnit runs in 6.8.

Keep boundary PHP versions and a reduced database matrix for routine runs. Restore the full PHP and database lists for dispatched runs and pull requests with the Full PHPUnit Matrix label.

Merges [63584], [63585], and [63779] to the 6.8 branch, adapted to its supported versions and scheduled dispatches.

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/13640

Reviewed by: desrosj.
Props adrianmoldovanwp, desrosj, lucatume.
See #66071.
Fixes #66069.

Note: See TracTickets for help on using tickets.