Skip to content

ci: measure coverage with xdebug instead of pcov - #35

Merged
bmfmancini merged 1 commit into
developfrom
ci/coverage-xdebug
Sep 30, 2026
Merged

bmfmancini merged 1 commit into
developfrom
ci/coverage-xdebug

Conversation

@TheWitness

Copy link
Copy Markdown
Member

What

Switches the CI coverage driver from pcov to xdebug.

Why

The Enforce coverage of changed lines gate (merged recently) was measuring
0 lines: pcov only instruments files under its auto-detected directory
(the Composer root / vendor parent), which excludes cacti/plugins/<plugin>
when Pest runs from the cacti/ checkout. So the gate could never see the
plugin's own source and would pass trivially (or block a real change with a
0%/absent-from-Clover result).

xdebug instruments every executed file, so changed-line coverage is measured
correctly. This matches the driver used by the rest of the plugin fleet.

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/<plugin> 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused configuration change correctly addresses missing plugin-source coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Switches CI coverage collection from PCOV to Xdebug so plugin source files are included in patch-coverage reports.

Changes:

  • Configures Xdebug as the CI coverage driver.
  • Documents the coverage-driver correction.
File Description
.github/​workflows/​plugin-ci-workflow.yml Enables Xdebug coverage.
CHANGELOG.md Records the CI change and rationale.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bmfmancini
bmfmancini merged commit 554564b into develop Sep 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants