Skip to content

ci: remove coverage job until proper scoping is in place - #16

Merged
rpgmem merged 3 commits into
mainfrom
claude/fix-coverage-job-pcov
Apr 15, 2026
Merged

ci: remove coverage job until proper scoping is in place#16
rpgmem merged 3 commits into
mainfrom
claude/fix-coverage-job-pcov

Conversation

@rpgmem

@rpgmem rpgmem commented Apr 15, 2026

Copy link
Copy Markdown
Owner

Summary

The PHPUnit coverage job ran for 14+ minutes under both xdebug and pcov against the full ./includes whitelist (3165 tests, hundreds of files), repeatedly hitting the 15-minute timeout and producing a red check on every PR.

Two changes here:

  1. Drop the dedicated coverage job from ci.yml. The non-blocking continue-on-error: true was masking a job that never produced a useful artifact in CI anyway.
  2. Drop processUncoveredFiles="true" from phpunit.xml.dist. With that option PHPUnit instruments every whitelisted file even when no test loads it, which was a major contributor to the slowness. Local coverage runs (when developers explicitly want them) will now be fast.

Coverage will be re-introduced in the Coveralls sprint with proper scoping: pcov.directory pinned to a smaller surface, test groups, and Coveralls upload via the dedicated action.

Test plan

  • CI completes without the long-running coverage job.
  • All matrix PHPUnit jobs stay green.
  • PHPStan, CodeQL, and Composer audit stay green.

https://claude.ai/code/session_01R9VorcXFuwNXToG5wZgjSv

claude and others added 3 commits April 15, 2026 01:55
The PHPUnit coverage job with xdebug hung for 23 minutes on PR #15
(run 24431707679). Switch to pcov which is ~10x faster for coverage
collection and bound the job with a 15-minute timeout to fail fast
if a hang ever recurs.

The job remains non-blocking (continue-on-error: true) until the
team opts to promote it to a required check.
processUncoveredFiles="true" forces PHPUnit to parse every file in
the coverage whitelist even when it is never loaded during test
execution. Under both xdebug and pcov this inflates coverage
generation from seconds to 10-23 minutes and triggered the CI
timeouts observed in runs #24431707679, #24432406275 and
#24432379066.

Removing the attribute (PHPUnit 9 default is false) restores fast
coverage collection. The reported coverage percentage now reflects
only files actually exercised by tests, which is the honest metric
anyway.
@rpgmem
rpgmem merged commit e003bf2 into main Apr 15, 2026
15 of 16 checks passed
@rpgmem rpgmem changed the title ci: switch coverage job to pcov and add 15min timeout ci: remove coverage job until proper scoping is in place Apr 15, 2026
rpgmem pushed a commit that referenced this pull request Apr 15, 2026
- Commit package-lock.json so CI gets a deterministic install and can
  use actions/setup-node's built-in npm cache.
- Switch assets workflow to `npm ci` with cache: 'npm'.
- Add CONTRIBUTING.md covering setup, branch naming, conventional
  commits, local checks, and the asset rebuild flow.
- Add dependency-review workflow that fails PRs introducing high-
  severity advisories.
- Remove the PHPUnit coverage job from ci.yml (carry-over from PR #16
  squash; covered by the inline comment for the Coveralls sprint).
rpgmem added a commit that referenced this pull request Apr 15, 2026
- Commit package-lock.json so CI gets a deterministic install and can
  use actions/setup-node's built-in npm cache.
- Switch assets workflow to `npm ci` with cache: 'npm'.
- Add CONTRIBUTING.md covering setup, branch naming, conventional
  commits, local checks, and the asset rebuild flow.
- Add dependency-review workflow that fails PRs introducing high-
  severity advisories.
- Remove the PHPUnit coverage job from ci.yml (carry-over from PR #16
  squash; covered by the inline comment for the Coveralls sprint).

Co-authored-by: Claude <noreply@anthropic.com>
rpgmem added a commit that referenced this pull request Apr 15, 2026
- Commit package-lock.json so CI gets a deterministic install and can use actions/setup-node's built-in npm cache.
- Switch assets workflow to npm ci with cache: 'npm'.
- Add CONTRIBUTING.md covering setup, branch naming, conventional commits, local checks, and the asset rebuild flow.
- Add dependency-review workflow that fails PRs introducing high-severity advisories.
- Remove the PHPUnit coverage job from ci.yml (carry-over from PR #16 squash).
rpgmem pushed a commit that referenced this pull request Apr 15, 2026
Bring coverage back after PR #16's removal, this time with the scoping
that earlier attempts lacked:

- Use pcov via setup-php's `coverage: pcov`.
- pcov.directory pinned to ./includes (matches the autoload PSR-4 root).
- pcov.exclude regex skips /libraries/ and /views/ subtrees, which were
  the bulk of what slowed runs to 14+ minutes previously.
- timeout-minutes: 15 keeps a runaway from blocking forever.
- continue-on-error: true so coverage is advisory until a baseline %
  is established and Coveralls thresholds can gate.

Upload via coverallsapp/github-action@v2 using GITHUB_TOKEN (sufficient
for public repos — no Coveralls repo token to provision).
rpgmem added a commit that referenced this pull request Apr 15, 2026
Bring coverage back after PR #16's removal, this time with the scoping
that earlier attempts lacked:

- Use pcov via setup-php's `coverage: pcov`.
- pcov.directory pinned to ./includes (matches the autoload PSR-4 root).
- pcov.exclude regex skips /libraries/ and /views/ subtrees, which were
  the bulk of what slowed runs to 14+ minutes previously.
- timeout-minutes: 15 keeps a runaway from blocking forever.
- continue-on-error: true so coverage is advisory until a baseline %
  is established and Coveralls thresholds can gate.

Upload via coverallsapp/github-action@v2 using GITHUB_TOKEN (sufficient
for public repos — no Coveralls repo token to provision).

Co-authored-by: Claude <noreply@anthropic.com>
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