Skip to content

Nuxt: upload PHP and client coverage to Coveralls as one build - #949

Open
edwh wants to merge 3 commits into
nuxt-clientfrom
nuxt-coverage
Open

edwh wants to merge 3 commits into
nuxt-clientfrom
nuxt-coverage

Conversation

@edwh

@edwh edwh commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Targets nuxt-client (#898). The develop-side equivalent for PHP only is #947.

What this does

  • scripts/coveralls.sh uploads coverage with the official Coveralls reporter (pinned to v0.6.22):
    • report php clover tests/clover.xml, from the build job. Container paths (/var/www/) are made repo-relative.
    • report client lcov client/coverage/lcov.info client, from build-client. Vitest now runs with --coverage there.
    • done, from a new coverage-done job that runs on develop after build and build-client and closes the build.
  • The two uploads are parallel jobs flagged php and client in one Coveralls build (keyed on the CircleCI workflow id), so the README badge shows combined coverage.
  • Uploads only happen on develop, matching the existing rule that coverage is only generated there (60-minute job cap). The script skips without COVERALLS_REPO_TOKEN and fails the job if Coveralls rejects an upload.
  • docker:test:phpunit no longer uploads; upload-coverage.sh is removed. It posted raw Clover XML to an endpoint that only accepts Coveralls JSON, so every upload was rejected while the script printed success.
  • The README badge points at develop.

When develop is next merged into nuxt-client, keep this version over #947's coverage:upload task.

Not in code

For a Coveralls status check on PRs, enable the Coveralls GitHub integration for the repo on coveralls.io.

upload-coverage.sh posted raw Clover XML to the Coveralls jobs API, which
only accepts Coveralls JSON, so every upload was rejected while the script
reported success.

scripts/coveralls.sh runs the pinned official reporter instead. On develop,
the build job uploads PHP coverage (flag php) and build-client uploads
Vitest lcov coverage (flag client) as parallel jobs, and a coverage-done job
closes the Coveralls build once both have run. It skips without
COVERALLS_REPO_TOKEN or off develop, and fails if Coveralls rejects an
upload.

Point the README coverage badge at develop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread scripts/coveralls.sh Fixed
edwh and others added 2 commits October 27, 2026 17:50
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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