Skip to content

Migrate coverage reporting from Coveralls to Codecov#2

Merged
BenMorel merged 3 commits intomainfrom
copilot/migrate-to-codecov-coverage
Feb 27, 2026
Merged

Migrate coverage reporting from Coveralls to Codecov#2
BenMorel merged 3 commits intomainfrom
copilot/migrate-to-codecov-coverage

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

Replaces Coveralls with Codecov for coverage reporting across all CI jobs, removing the php-coveralls dependency in favor of the codecov/codecov-action. Switches the coverage driver from xdebug to pcov for faster coverage collection.

Changes

  • .github/workflows/ci.yml — Updated all 6 PHPUnit jobs (MySQL/MariaDB/Postgres × PDO/Doctrine):
    • Simplified clover output path from build/logs/clover.xmlclover.xml (removes mkdir -p build/logs)
    • Replaced php-coveralls upload step with codecov/codecov-action@v5 using CODECOV_TOKEN
    • Switched coverage driver from xdebug to pcov
  • README.md — Added Codecov coverage badge after the existing CI badge
  • composer.json — Removed php-coveralls/php-coveralls from require-dev
Original prompt

Migrate from Coveralls to Codecov for coverage reporting, mirroring the changes made in brick/math#109.

Changes required

1. .github/workflows/ci.yml

In every PHPUnit job that uploads coverage to Coveralls, make the following changes:

  • In the "Run PHPUnit with coverage" step, change the clover output path from build/logs/clover.xml to clover.xml (and remove the mkdir -p build/logs line, since the file is now written to the root). For example:

    - name: Run PHPUnit with coverage
      run: vendor/bin/phpunit --coverage-clover clover.xml
      if: ...

    Note: If there is a --fail-on-skipped flag, keep it. If not, don't add it.

  • Replace every "Upload coverage report to Coveralls" step with:

    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v5
      env:
        CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      if: ...  # keep the same `if:` condition as the original step, if any

    (Remove the old step that runs vendor/bin/php-coveralls with COVERALLS_REPO_TOKEN.)

Note: brick/lock has multiple PHPUnit jobs (for different database backends). Make sure to update all of them.

2. README.md

The README currently does not have a Coveralls badge. Add a Codecov badge after the existing Build Status badge:

[![Coverage](https://codecov.io/github/brick/lock/graph/badge.svg)](https://codecov.io/github/brick/lock)

Place it right after the line:

[![Build Status](https://github.com/brick/lock/workflows/CI/badge.svg)](https://github.com/brick/lock/actions)

3. composer.json

Remove php-coveralls/php-coveralls from require-dev.

This pull request was created from Copilot chat.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: BenMorel <1952838+BenMorel@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate from Coveralls to Codecov for coverage reporting Migrate coverage reporting from Coveralls to Codecov Feb 27, 2026
@BenMorel BenMorel marked this pull request as ready for review February 27, 2026 12:45
@BenMorel
Copy link
Member

@copilot Use pcov for coverage.

@codecov
Copy link

codecov bot commented Feb 27, 2026

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 ☂️

Co-authored-by: BenMorel <1952838+BenMorel@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 27, 2026

@copilot Use pcov for coverage.

Done — all 6 PHPUnit jobs now use pcov instead of xdebug for coverage (commit 9a96c16).

@BenMorel BenMorel merged commit db58937 into main Feb 27, 2026
30 checks passed
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