Skip to content

ci: upload test coverage to Codecov - #37

Merged
turegjorup merged 4 commits into
developfrom
ci/enable-codecov
Jul 8, 2026
Merged

ci: upload test coverage to Codecov#37
turegjorup merged 4 commits into
developfrom
ci/enable-codecov

Conversation

@turegjorup

Copy link
Copy Markdown
Contributor

The README already links a Codecov badge, but CI never produced or uploaded a coverage report. Wire it up, mirroring the event-database-imports setup.

Changes

  • Taskfile.yml — new api:test:coverage target: runs PHPUnit with XDEBUG_MODE=coverage and --coverage-clover=coverage/unit.xml (the itkdev php8.4 image already ships Xdebug).
  • .github/workflows/pr.yaml — the api-test job now runs task api:test:coverage and uploads via codecov/codecov-action@v5 with flags: unittests, using the org-level CODECOV_TOKEN secret.
  • .gitignore — ignore the generated /coverage directory.

Verification

task api:test:coverage locally produces a valid Clover coverage/unit.xml and the suite still gates (164 tests, 4 skipped). YAML is prettier-clean. coverage/ is untracked.

Note

Coverage upload needs the org-level CODECOV_TOKEN to be exposed to this repo's Actions (same as event-database-imports). If the first run reports a missing token, that's an org/repo secret-visibility setting, not a workflow change.

The README already links a Codecov badge but CI never uploaded a report.
Generate a Clover report from the API test suite and upload it, matching the
event-database-imports setup.

- Add a `api:test:coverage` Task target running PHPUnit with XDEBUG_MODE=coverage
  and --coverage-clover=coverage/unit.xml.
- Run it in the pr.yaml api-test job and upload via codecov/codecov-action@v5
  (org-level CODECOV_TOKEN secret).
- Ignore the generated /coverage directory.
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

No changes detected in API specification

@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@turegjorup turegjorup self-assigned this Jul 8, 2026
@turegjorup
turegjorup merged commit d1e50fc into develop Jul 8, 2026
12 checks passed
@turegjorup
turegjorup deleted the ci/enable-codecov branch July 8, 2026 08:29
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