From 2bce1766abe59925600c9cfbdd1fa34cf9fff726 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Tue, 29 Sep 2026 18:29:57 -0400 Subject: [PATCH] ci: measure coverage with xdebug instead of pcov The "Enforce coverage of changed lines" gate measured 0 lines because pcov only instruments files under its auto-detected directory (the Composer root / vendor parent), which excludes cacti/plugins/ when Pest runs from the cacti/ checkout. xdebug instruments every executed file, so changed-line coverage is measured correctly. Matches the driver the rest of the plugin fleet uses. --- .github/workflows/plugin-ci-workflow.yml | 2 +- CHANGELOG.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index 7e01596..61b52b4 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -82,7 +82,7 @@ jobs: with: php-version: ${{ matrix.php }} extensions: intl, mysql, gd, ldap, gmp, xml, curl, json, mbstring, snmp - coverage: pcov + coverage: xdebug ini-values: "post_max_size=256M, max_execution_time=60, date.timezone=America/New_York" - name: Check PHP version diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ca99f2..88fa878 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ --- develop --- +* dev: Measure CI coverage with xdebug instead of pcov so the plugin's own sources are instrumented (pcov auto-scopes to the Composer root and skipped cacti/plugins/, leaving the patch-coverage gate with nothing to measure) * dev: Enforce patch coverage of changed lines in CI and remove the inert COMPOSER_ROOT_VERSION env from the Pest step * security: Add a version-safe CSP nonce (`plugin_wmi_csp_nonce()`) to every inline `