r-lib / covr

Test coverage reports for R
https://covr.r-lib.org
Other
336 stars 117 forks source link

[Feature Request] Add support for longtests in `package_coverage()` #555

Open xec-cm opened 11 months ago

xec-cm commented 11 months ago

Description

This feature would allow users to specify a new parameter, type = "longtests", in the package_coverage() function. This would be useful for Bioconductor users who want to divide their tests into two folders, one for normal tests and one for long tests that take longer to run.

Context

Currently, Bioconductor software packages run code in the tests subdirectory on a daily basis as part of the Bioconductor nightly builds. The maximum amount of time that R CMD check is allowed to spend on each package is 40 minutes. However, some package developers may wish to implement tests that will be too long to run in the context of the nightly builds. To address this issue, Bioconductor users can set up “long tests” in their package and add the package to the Bioconductor Long Tests builds. The code in the longtests subdirectory will be run once a week (every Saturday) as part of the Long Tests builds and will be allowed to run for a maximum of 6 hours before a TIMEOUT is raised.

Justification

Adding support for the type = "longtests" parameter in the package_coverage() function would allow Bioconductor users to generate coverage reports for their long tests separately from their normal tests. This would make it easier for users to identify which tests are taking longer to run and optimize their testing process accordingly.

Implementation details

The type = "longtests" parameter would be added to the package_coverage() function. The longtests folder would have the same structure as the tests folder, but with a different name.

Example usage

covr::package_coverage(type = "longtests")