fosslight / fosslight_scanner

FOSSLight Scanner
Apache License 2.0
17 stars 17 forks source link

Integrate Code Coverage Measurement and Codecov Upload in PR and Release Workflows #112

Open JaeHyuckSa opened 1 month ago

JaeHyuckSa commented 1 month ago

Is your feature request related to a problem? Please describe. I'm always frustrated when I can't easily verify the code coverage during pull requests and before releases. Currently, there is no automated way to ensure that our code changes maintain or improve coverage, making it difficult to consistently monitor and improve the quality of the codebase.

Describe the solution you'd like I would like to integrate code coverage measurement into our GitHub Actions workflows, with an additional step to upload the coverage report to Codecov. The workflow should run automatically during pull requests and when a release is published. After the tests run, the coverage report should be uploaded to Codecov, where we can track the coverage trends over time. This will allow us to easily review and enforce coverage thresholds as part of our CI/CD process.

Describe alternatives you've considered An alternative solution was to manually run code coverage tests locally before submitting a PR or creating a release, and then manually checking the results. However, this approach is prone to human error and can lead to inconsistencies in how coverage is measured and reported. Another alternative was to use only GitHub Actions to display the coverage report, but this lacks the comprehensive analysis and historical tracking provided by Codecov.

Additional context We are currently using pytest and pytest-cov for testing. The proposed feature would build on our existing setup by adding the necessary steps to our CI pipeline in GitHub Actions, including a step to upload the coverage report to Codecov. This change would help us maintain code quality and provide better insights into our test coverage over time, making it easier to identify areas that need improvement.