Skip to content

Commit

Permalink
fix: update REAMDE
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu-codecov committed Mar 13, 2023
1 parent c9ddec0 commit 3712333
Showing 1 changed file with 6 additions and 34 deletions.
40 changes: 6 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,18 @@
# [Codecov](https://codecov.io) PHP Example
[![codecov](https://codecov.io/github/codecov/example-php/branch/main/graph/badge.svg?token=A7Mb0qlkNW)](https://app.codecov.io/github/codecov/example-php)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fexample-php.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-php?ref=badge_shield)

This example repository shows how Codecov can be integrated with a simple php project. It uses **GitHub Actions** as the CI/CD provider and **phpunit** as the coverage provider.

## Guide

### Travis Setup

Add to your `.travis.yml` file.
```yml
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](https://github.com/codecov/example-php/blob/master/.travis.yml#L15)

### FAQ
- Q: Can I use phpunit.xml.dist?<br/>A: Start tracking coverage metrics by adding a coverage logger:
```xml
<phpunit>
...
<logging>
<log type="coverage-clover" target="clover.xml"/>
</logging>
</phpunit>
```
- Q: I don't see one or more files, why?<br/>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.
For more information, please see the links below.

## Links
- [Quick Start](https://docs.codecov.com/docs/quick-start)
- [GitHub Tutorial](https://docs.codecov.com/docs/github-tutorial)
- [Community Boards](https://community.codecov.io)
- [Support](https://codecov.io/support)
- [Documentation](https://docs.codecov.io)


## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fexample-php.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-php?ref=badge_large)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fexample-php.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-php?ref=badge_large)

0 comments on commit 3712333

Please sign in to comment.