Skip to content

feat: install coverage driver when coverage input is set#14

Merged
phramz merged 1 commit into
mainfrom
feat/coverage-input
Apr 17, 2026
Merged

feat: install coverage driver when coverage input is set#14
phramz merged 1 commit into
mainfrom
feat/coverage-input

Conversation

@phramz

@phramz phramz commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The coverage input was parsed but never applied. PHPUnit runs with --coverage-* aborted with No code coverage driver available / No tests executed! unless the runner's system PHP happened to ship a driver.
  • Plan.ApplyCoverage now adds the requested driver to the effective extensions list so the existing resolve/fetch/compose pipeline installs and configures it from the catalog.
  • coverage: xdebugxdebug.mode=coverage; coverage: pcovpcov.enabled=1; coverage: none (default) unchanged.

Test plan

  • make check (gofmt, vet, golangci-lint, go test -race -cover, eslint, build)
  • New table test TestApplyCoverage covers: none, empty, xdebug, pcov, already-present, empty extensions
  • End-to-end: add coverage: pcov to a workflow consuming buildrush/setup-php@v1 and confirm --coverage-cobertura runs

The coverage input (xdebug, pcov) was parsed but never acted upon, so
PHPUnit runs with --coverage-* aborted with "No code coverage driver
available" / "No tests executed!" unless the runner happened to have a
driver in its system PHP. Auto-install the requested driver from the
catalog and configure it:

- coverage: xdebug -> installs xdebug with xdebug.mode=coverage
- coverage: pcov   -> installs pcov with pcov.enabled=1
- coverage: none   -> unchanged (no driver installed)

Plan.ApplyCoverage adds the driver to the effective extensions list so
the existing resolve/fetch/compose pipeline handles it transparently.
@phramz
phramz merged commit e3b90cd into main Apr 17, 2026
10 checks passed
@phramz
phramz deleted the feat/coverage-input branch April 17, 2026 10:48
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.

1 participant