From 3745663061565de179d7106d366eacc105c9aca0 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Tue, 29 Sep 2026 18:37:08 -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 c49783e..bc7b2a0 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -83,7 +83,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 e351c68..ae94882 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ --- 2.1 --- +- 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_gexport_csp_nonce()`) to every inline `