Skip to content

Metrics Code Coverage

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

Setting up Code Coverage

This project uses SonarCloud to monitor code coverage , quality gates and other related metrics. To setup monitoring, please follow the below steps:

  • Signup for a free account at SonarCloud for open source projects. Choose GitHub as your Code Host.
  • Choose the repository you wish to monitor
  • Follow the instructions to setup CI/CD choosing CircleCI as your CI provider
  • Head over to your GitHub repository and create a secret named SONAR_TOKEN and save the token
  • Your next push to master will trigger the build workflow and upload code coverage metrics to SonarCloud

Setup project badge(s)

  • Login to SonarCloud and head over to your project's settings --> Badges

  • Copy the badge's url and image url

  • Open up the blueprint.json file in the root of this repository

  • Locate the related badge id

  • Replace the url with your SonarCloud badge url

  • Replace the img with SonarCloud 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 SonarCloud badge(s) and can be added to your github repository

Clone this wiki locally