ci: coverage off the PR path → nightly + branch coverage (#624 S9, drops S5)#633
Conversation
PR and push runs no longer instrument with xdebug — the unit/integration/e2e jobs run coverage-free on the critical path. A nightly schedule (03:00 UTC) and on-demand workflow_dispatch re-collect coverage with xdebug and upload to Codecov. phpunit.xml.dist enables branchCoverage; the covered runs emit Cobertura (which carries branch data) instead of Clover. Supersedes S5 (xdebug -> pcov): pcov is line-coverage-only and would have foreclosed branch/path coverage; keeping xdebug lets us collect branch coverage. Only 'CI Success' is a required check, so dropping the per-PR Codecov uploads does not affect the merge gate. Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
|
There was a problem hiding this comment.
Code Review
This pull request updates the PHPUnit configuration in phpunit.xml.dist to enable branch coverage. The reviewer correctly pointed out that the branchCoverage attribute is not supported by PHPUnit's XML schema and suggested using pathCoverage="true" instead to prevent schema validation errors.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
S9) (#634) Follow-up to #633 (S9). The nightly / `workflow_dispatch` coverage run enables xdebug **branch** coverage, which is ~6× slower than a plain run — the `workflow_dispatch` verification showed the unit suite exceeding its 10-min timeout (cancelled at 558s), integration at ~703s. Raise `test-unit` 10→30 min and `test-integration` 15→25 min. The PR/push path skips coverage (`XDEBUG_MODE=off`) and finishes in ~90s, so these timeouts only bind the nightly coverage run. Refs #624.



Summary
Two related changes, replacing the dismissed S5 (xdebug→pcov):
Why not pcov (S5, dismissed)
pcov is line-coverage only — it's fast precisely because it does less. Switching to it would have permanently foreclosed branch/path coverage for a marginal ~18s. We already run on xdebug (branch/path-capable); the better move is to keep xdebug, get coverage off the PR path (S9), and actually enable branch coverage.
Changes
ci.yml:unit/integration/e2erun coverage-free onpull_requestandpush(no xdebug instrumentation). Aschedule(03:00 UTC nightly) +workflow_dispatchre-collect coverage and upload to Codecov; the Codecov upload steps are gated to those events.phpunit.xml.dist:<coverage branchCoverage="true"/>— covered runs now collect branch coverage.--coverage-cobertura) instead of Clover, since Cobertura carries branch data for Codecov.Safety
CI Successis a required status check —codecov/patchandcodecov/projectare informational, so dropping per-PR coverage uploads does not affect the merge gate.XDEBUG_MODE=off, 1939 unit tests OK).--coverage-coberturawithbranchCoverage=trueemitsbranch-rate/branches-covered(127/158) — real branch data (pcov cannot produce this).Verification note
This PR's own CI run exercises the coverage-off (PR) path. The coverage-on (nightly) path runs on the schedule, or via
workflow_dispatchonce the file is on the default branch — I'll trigger a dispatch to confirm the Cobertura upload + branch data after merge.Refs #624. Dismisses S5.