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/.
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 multisiteImpact
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:.and the equivalent for
test-php-multisite:into./multisite-reports/.