Skip to content

ci: coverage off the PR path → nightly + branch coverage (#624 S9, drops S5)#633

Merged
CybotTM merged 1 commit into
mainfrom
ci/s9-coverage-nightly-branch-624
Jul 15, 2026
Merged

ci: coverage off the PR path → nightly + branch coverage (#624 S9, drops S5)#633
CybotTM merged 1 commit into
mainfrom
ci/s9-coverage-nightly-branch-624

Conversation

@CybotTM

@CybotTM CybotTM commented Jul 15, 2026

Copy link
Copy Markdown
Member

Summary

Two related changes, replacing the dismissed S5 (xdebug→pcov):

  1. S9 — move code coverage off the PR critical path to a nightly run.
  2. Enable branch coverage — the thing pcov couldn't do.

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 / e2e run coverage-free on pull_request and push (no xdebug instrumentation). A schedule (03:00 UTC nightly) + workflow_dispatch re-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.
  • Covered unit/integration runs emit Cobertura (--coverage-cobertura) instead of Clover, since Cobertura carries branch data for Codecov.

Safety

  • Only CI Success is a required status checkcodecov/patch and codecov/project are informational, so dropping per-PR coverage uploads does not affect the merge gate.
  • PR-path tests verified passing without coverage (XDEBUG_MODE=off, 1939 unit tests OK).
  • Branch coverage verified locally: --coverage-cobertura with branchCoverage=true emits branch-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_dispatch once 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.

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>
@sonarqubecloud

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread phpunit.xml.dist

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@CybotTM
CybotTM merged commit bcb2f3a into main Jul 15, 2026
17 of 18 checks passed
@CybotTM
CybotTM deleted the ci/s9-coverage-nightly-branch-624 branch July 15, 2026 11:03
CybotTM added a commit that referenced this pull request Jul 15, 2026
 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.
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.

2 participants