hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

[FEATURE]: setup code coverage for local tests & CI

Open lsampras opened this issue 2 years ago • 4 comments

Context

As any other codebase, unit tests are vital to maintain stability & correctness of code.. Currently while the project has some amount of tests, We still don't have a code coverage tracking in place which robs people of some of the incentives for adding tests. We should aim to add code coverage checks on PR's to add the necessary incentives in place

Objectives

We need unit test runs + code coverage summaries on PR's to get an idea about the diff in code coverage caused by the PR...

For local development people often have their own ways to run & test code locally... However we would also like to provide a standardized approach via Makefile that has to be consistent with the report generated via CI...

For CI we have shortlisted codecov due to it's open-source friendliness & locally we prefer to have an lcov based diff generated due to integrations with vscode etc..

Any temporary files generated due to code coverage locally shouldn't be tracked & should be auto-ignored via the .gitignore file (you can update the .gitignore file to do so)

As for testing out your CI changes you can install codecov on your fork to demonstrate a working version of this

  • [ ] #1593
  • [ ] #1622

lsampras avatar Jul 02 '23 10:07 lsampras

I can implement the CI part of codecov. Should I go ahead?

SamantaTarun avatar Jul 02 '23 14:07 SamantaTarun

hey, sure I've created a sub-issue for this #1593 , Do check it out let us know if you need any help

lsampras avatar Jul 03 '23 07:07 lsampras

Is this issue still available. I am ready to work on this. I already setup Codecov in one of the open source project. Thank you : )

aialok avatar Mar 26 '24 11:03 aialok

Is this issue still available. I am ready to work on this. I already setup Codecov in one of the open source project. Thank you : )

Responded on the child issue: https://github.com/juspay/hyperswitch/issues/1593#issuecomment-2020255701

SanchithHegde avatar Mar 26 '24 12:03 SanchithHegde