Skip to content

codecov/example-php

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Codecov PHP Example

FOSSA Status

Guide

Travis Setup

Add to your .travis.yml file.

language: php

script:
    - vendor/bin/phpunit --coverage-clover coverage.xml

after_success:
    - bash <(curl -s https://codecov.io/bash)

Produce Coverage Reports

Collect coverage reports vendor/bin/phpunit --coverage-clover coverage.xml, see here

FAQ

  • Q: Can I use phpunit.xml.dist?
    A: Start tracking coverage metrics by adding a coverage logger:
<phpunit>
 ...
 <logging>
       <log type="coverage-clover" target="clover.xml"/>
   </logging>
</phpunit>
  • Q: I don't see one or more files, why?
    A: Codecov will only show files that have lines covered (hit or miss). If your file has no statments it will not show up in Codecov until you add some. Go get em' tiger!

Caveats

Private Repo

Repository tokens are required for (a) all private repos, (b) public repos not using Travis-CI, CircleCI or AppVeyor. Find your repository token at Codecov and provide via appending -t <your upload token> to you where you upload reports.

Links

License

FOSSA Status

About

PHP coverage example

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published