At our company we have a collection of different packages that help run a certain workflow. Our testing suite (testthat + TRAVIS CI) is divided into two files, one that runs the tests for that specific package only and one that runs the entire workflow. This is to make sure that any new code doesn't break both the package and the general workflow that it helps run.
However, the tests for the general workflow do take a bit longer and we would like to restrict it so that the general workflow tests ONLY run when we do a pull-request to the package (when we have introduced new functionality on a different dev branch) while the package-specific tests keep running everytime we commit/push to the repo.
Wondering if anybody has done this / could share a link to an R package that has done something similar?
Yes this works! Thank you so much @jdblischak! This is MUUUUCH simpler that trying to figure out how to do integration testing. All we have to do is separate our files into normal tests and integration tests and then put skip_on_travis_commit() on the top of the integration tests and that makes everything better!