Skip to content

De-duplicate per-plugin coverage lists in php-test-plugins workflow #2594

Description

@mukeshpanchal27

Description

In .github/workflows/php-test-plugins.yml, the single-site and multisite coverage steps hard-code the full list of 10 plugins — twice:

npm run test-php:performance-lab -- -- -- --coverage-clover=./single-site-reports/coverage-performance-lab.xml
npm run test-php:auto-sizes -- -- -- --coverage-clover=./single-site-reports/coverage-auto-sizes.xml
# ...and 8 more, repeated again for multisite

Impact

Every new plugin requires editing two hard-coded lists here (plus other files). This is a recurring source of drift — easy to add a plugin and forget its coverage line.

Proposed fix

Loop over plugins.json, the source of truth:

for plugin in $(jq -r '.plugins[]' plugins.json); do
  npm run "test-php:$plugin" -- -- -- --coverage-clover="./single-site-reports/coverage-$plugin.xml"
done

.and the equivalent for test-php-multisite: into ./multisite-reports/.

Metadata

Metadata

Assignees

Labels

Good First IssueIssue particularly suitable to be worked on by new contributorsInfrastructureIssues for the overall performance plugin infrastructure

Projects

Status
Done 😃

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions