Hi Posit Community,
We're seeking advice on how to best manage long-running integration tests: specifically, regarding their storage location (within the same repository or a separate one for just long-running tests) and their execution frequency. Our R package includes integration tests (for statistical models) that cause devtools::test() to take approximately 21 minutes, slowing down local development and CI as we add more tests for new features. We currently store all tests under tests/testthat
.
We're considering the following approaches and welcome your feedback on their pros/cons or any alternative solutions:
- Use naming conventions (e.g.,
test-unit-*.R
,test-integration-*.R
) and develop helper functions to allow developers to run specific test subsets locally. - Skip these long-running integration tests during
R CMD check
. - Create a separate GitHub Actions workflow for long-running integration tests, to be run less frequently.
Thanks!