From 3712333d35c6f6f37c8a473ef8d9a5b091484de2 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Mon, 13 Mar 2023 19:16:27 -0400 Subject: [PATCH] fix: update REAMDE --- README.md | 40 ++++++---------------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 0892ba8..b91974c 100644 --- a/README.md +++ b/README.md @@ -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?
A: Start tracking coverage metrics by adding a coverage logger: - ```xml - - ... - - - - -``` -- 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 ` 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) \ No newline at end of file +[![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)