-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub Actions to check Unit Test Coverage for each package #3206
Comments
I would vote for the second solution (function coverage). This is because functions do have unit tests which get skipped on CI because they need an additional setup to execute for e.g tests dependent on |
That's actually a good reason for using |
@Aariq @meetagrawal09 can i work on adding covr in the ci? |
@Min2who, thanks for showing your interest in contributing to the issue. I am working on improving our tests without which |
@meetagrawal09 can i work on test of this files |
Description
I would like to propose adding an action item about checking unit test coverage for packages on CI. This is a step towards always having packages cross a specific percentage of test coverage whenever new functions are added to them. This will enforce (up to some degree) the author of a new function to add tests (might be basic) for the newly added function(s). The step is necessary to always maintain package functions reliable : )
Proposed Solution
I have identified 2 approaches for this :
Having line coverage as a metric. Using the covr package we can get line coverage percentages for each package which can help in deciding on how well the package has been tested.
Having function coverage as a metric. Here we use file names (or file contents) in the
tests/testthat
directory to decide on how good the test coverage is.Alternatives Considered
The reviewer can ask the PR author to add tests for the new functions that he/she might have added to the package(s). But that just increases the job of the reviewer.
The text was updated successfully, but these errors were encountered: