Search code examples
htmlgithubmarkdowncode-coveragebadge

How to display Codecov.io badge in GitHub README.md?


As mentioned in the title, how can I add a Codecov.io badge resembling the coverage of my project?

There is nothing stated about this in the Docs from Codecov.io.

Thanks in advance.


Solution

  • After a long search and Try-n-Error i was able to find something which implicitly helped finding it out.

    The way to implement a Codecov.io badge with your current Coverage ist the following :

    In HTML :

    <a href="https://codecov.io/github/<Your Organization/Acc.>/
    <YourRepo>?branch=master">
    <img alt="Coverage" src="https://codecov.io
    /github/<Your Organization/Acc.>/<YourRepo>/coverage.svg?branch=master">
    </a>
    

    In Markdown:

    [![codecov.io](https://codecov.io/github/<Your Organization/Acc.>/<YourRepo>/coverage.svg?branch=master)]
    (https://codecov.io/github/<Your Organization/Acc.>/<YourRepo>?branch=master)
    

    This Solution expects that you host the project on Github and that you upload the coverage reports.