Skip to content

Metrics Code Coverage

Dennis Chacko edited this page May 16, 2021 · 9 revisions

Setting up Code Coverage

This project uses Codecov to monitor code coverage metrics. To setup code coverage, please follow the below steps:

  • Signup for a free account at Codecov for open source projects. Choose GitHub as your Code Host.
  • Choose the repository you wish to monitor
  • Copy Token generated for the project
  • Head over to your GitHub repository and create a secret named CODECOV_TOKEN and save the token
  • Your next push to master will trigger the build workflow and upload code coverage metrics to Codecov

Setup CodeCov badge

  • Login to Codecov and head over to your project's settings --> Badges (see below)
CodeCov Badge Urls
  • Copy the badge's url and image url
  • Open up the 'blueprint.json' file in the root of this repository
  • Locate the codecov badge id
  • Replace the url with your Codecov badge url
  • Replace the img with Codecov badge image url
  • Execute the below command to autogenerate the README.md file
foo@bar:~$: npx @appnest/readme generate
[readme] - A readme file was successfully generated at "README.md".

The README.md is now generated with your Codecov badge and can be added to your github repository

Clone this wiki locally