WordPress / WordPress/performance

Unit testing should be skipped for plugins not related to changes in a pull request

Open
#1,792 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Enhancement Infrastructure
Dominant language
PHP
Stars
461
Forks
165
Avg merge
11h 12m
Merged PRs (30d)
28

Description

Feature Description

When opening a pull request that changes files to one plugin, only the unit tests for that plugin should run. This will greatly speed up our workflows (and reduce wasted compute), especially now that code coverage is being performed. That said, would it be problematic if PRs didn't include coverage reports for all plugins?

Note that a PR that modifies Optimization Detective should also cause the tests for Embed Optimizer and Image Prioritizer to also run, since they are dependent on that plugin.

Naturally, all tests would run for all plugins for commits added to trunk.

This has been suggested before by @thelovekesh, but I don't remember where.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the pull-request workflow and the plugin unit-test configuration, then trace how plugin dependencies are represented. Done means changed plugins and their dependents are tested on pull requests, while trunk commits still run every plugin's tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
ci-cd, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.