Travis-CI testing packages with a custom script



We use for automated testing. A big thanks to everyone who made that happen.

For a few different reasons (private repos, test run-time), we have a custom script we run in travis.yaml.

I believe that the warnings_are_errors: true block is being ignored. Or at last, that’s the behavior I’m seeing.

If that is expected (?), then it might make sense to warn people that warnings_are_errors: true will be ignored. Let me know if that’s not expected.

How could someone using a custom script duplicate the behavior of warnings_are_errors: true?


I believe what’s going on has to do with how warnings_are_errors works. I checked the documentation for the R language builder and I found this:

warnings_are_errors: This option forces all WARNINGS from R CMD check to become build failures (default true). This is especially helpful when preparing your package for submission to CRAN, and is recommended for most packages.

My reading of that makes me think that warnings_are_errors only applies to R CMD check and not custom scripts. I believe you’ll need to modify your custom script to fail your build.


Basically all of the R specific options are not going to work if you are using a custom script: block. What warnings_are_errors does is simply looks for WARNING in the check logs, so you can do the same in your custom script.