Run unit tests on git push and integration tests on pull request


When building R packages, we use testthat to write tests. We have 2 files: a test file for the specific package (specific.R), and one that we use to make sure all packages continue to work together and the overall result is fine (overall.R). Both tests are currently run when we push to github or create a PR through Travis, which implicitly runs this line of code(R CMD check *tar.gz). check runs all the tests in the test folder, and thus both files are run.

Now, I'm a bit new to testing... but it seems that we have more or less recreated the difference b/w a <em>unit test</em> and an <em>integration test</em>.

Considering that the tests for overall.R do take a lot longer to run, we would like to restrict it so that they 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 every time we commit/push to the repo.

Is this possible in github or Travis?


You could put your overall.R script into a different directory and then specify this folder as the new tests directory for pull-request hooks, but this will then only run your integration tests and not the unit tests. See R CMD check --help

R CMD check --test-dir integration_tests package.tar.gz



  • String array in C#
  • How to set a CMFCPropertyListCtrl's column width?
  • can an android application check the version of the phone
  • Calling a function in Django after saving a model
  • MVC controller.Execute with areas
  • Avoid Double Encoding of URL query param with Spring's RestTemplate [duplicate]
  • 'self' seems to be hogging one of my arguments
  • How to find out what makes poi corrupt a xlsx / xlsm file
  • Returning large collections from WCF Serivce
  • Properly handle WM_PASTE in subclass procedure
  • IBM Worklight 6.1- [ERROR ] FWLSE0020E and [ERROR ] FWLSE0117E
  • Automatic refactoring tools? [closed]
  • Fitbit oauth2 public API stopped working. Giving error - Sorry Its not you.. Its us
  • Is there a modern ( e.g. CLR ) replacement for bison / yacc?
  • overriding equals and hashcode methods in java?
  • Stop the background service after particular time in android
  • In Python ElementTree how can I get list of all ancestors of an element in tree?
  • Adding custom message on Thank You page by shipping method
  • What is need of Assign/Deassign in Verilog?
  • Wrap array elements in divs based on same value
  • SpringBoot don't replacen System variable {user.home} in Spring Tool Suite Version: 3.8.4.RELEA
  • Is possible having two COM STA instances of the same component?
  • How does the dispatcher work when mixing sync/async with serial/concurrent queue?
  • How to display converted time zones in a 'generic week' (Sunday thru Saturday)?
  • “Cannot open log for source” - Windows 7 - .NET web service - event log
  • Building JavaFX 2.0 App on Mac, deploying on Windows
  • Stop an element moving with padding on hover
  • Django, uWSGI & nginx: Process dies for “no reason”
  • Is there a better way for handling SpatialPolygons that cross the antimeridian (date line)?
  • Unable to create Access token grant type in wso2 API manager store to test API
  • Python 3x- Compression Makes File Bigger :(
  • how to run ejabberd with Erlang on Heroku?
  • How to call jQuery function in HTML returned by AJAX
  • How do I add a mouse over tooltip to an Image using .DrawImage()
  • How to warp text around image in iOS?
  • Python Flask - GUI for client
  • JavaScript RegExp Replace