Skip to content

Migrate coverage reporting from Coveralls to Codecov#21

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

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

Conversation

Copy link
Contributor

Copilot AI commented Feb 26, 2026

  • Update .github/workflows/ci.yml: change coverage to pcov, fix clover path to clover.xml, replace Coveralls step with Codecov action (auto-detects coverage file)
  • Update README.md: replace Coveralls badge with Codecov badge
  • Update composer.json: remove 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 the phpunit job, 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). Also change coverage: xdebug to coverage: pcov in the Setup PHP step.

    The updated step should be:

    - name: Run PHPUnit with coverage
      run: vendor/bin/phpunit --coverage-clover clover.xml
      if: ${{ matrix.php-version == env.COVERAGE_PHP_VERSION }}
  • Replace the "Upload coverage report to Coveralls" step with:

    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v5
      env:
        CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      if: ${{ matrix.php-version == env.COVERAGE_PHP_VERSION }}

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

Note: the current "Run PHPUnit with coverage" step has a bug: mkdir -p mkdir -p build/logs — just remove that whole multi-line run block and replace with the single-line version above.

2. README.md

Replace the Coveralls badge with a Codecov badge:

  • Remove:
    [![Coverage Status](https://coveralls.io/repos/github/brick/phonenumber/badge.svg?branch=master)](https://coveralls.io/github/brick/phonenumber?branch=master)
    
  • Add:
    [![Coverage](https://codecov.io/github/brick/phonenumber/graph/badge.svg)](https://codecov.io/github/brick/phonenumber)
    

3. composer.json

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

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: BenMorel <1952838+BenMorel@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate coverage reporting from Coveralls to Codecov Migrate coverage reporting from Coveralls to Codecov Feb 26, 2026
@BenMorel BenMorel marked this pull request as ready for review February 26, 2026 23:34
Co-authored-by: BenMorel <1952838+BenMorel@users.noreply.github.com>
@BenMorel BenMorel merged commit c014d90 into master Feb 27, 2026
14 checks passed
@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 ☂️

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