WordPress/phpunit-test-runner

cicd pipeline for testing code changes

Ouverte

#274 ouverte le 17 sept. 2025

 (3 commentaires) (0 réaction) (0 personne assignée)PHP (77 forks)github user discovery
WCUS26enhancementhelp wantedtooling

Métriques du dépôt

Stars
 (77 étoiles)
Métriques de merge PR
 (Merge moyen 5j 16h) (1 PR mergée en 30 j)

Description

The runner needs a cicd pipeline for testing new pushes/PRs against coding standards, with a container for database builds that mimic a hosting environment, and automation that triggers prepare.php and test.php scripts to return any errors and other output- preferably with a Hosting Team reporting bot relaying data.

Tech specs

Keeping in line with Core standards - this should be built out using GitHub workflows/ actions runner image and Docker containerization for database testing, with phpcs, wpcs coding standard tests and automated triggering of runner scripts. Ideally a Hosting Team reporting bot would post results on PRs. The process of implementing this can be done iteratively.

First Runner code testing can be put in place, then automation triggering environment tests to simulate what happens in a hosting environment, and lastly a bot to report back any errors in PR comments. Then rinse and repeat for the reporter.

Which repos? PHPunit Test Runner - to start, and as the highest priority PHPunit Test Reporter - next priority although there is not much development happening here.

Examples: https://github.com/WordPress/wordpress-develop

GitHub Workflows

Pipeline References: Docker-compose.yml

Coding standards yml

codesniffer, wpcs

phpcs

Use Cases

Runner Issue #212 : Code here switches to using short array syntax ( $var = [] vs. $var = array() ). The former is eprohibited in wp coding standards. Tests would catch that and prompt a fix.

Runner issue #271: Incorrect syntax was not caught by humans and resulted in a parse error on host test environments

Guide contributeur