So in an attempt to be clever, I tried encoding a .httr-oauth token as a base64 string and saving it as an environmental variable in Travis. To test whether this would work at all, I wrote a few short tests to check that the variable is there, non-zero, and that I can create the token from it (https://github.com/ropenscilabs/gdoc/blob/master/tests/testthat/test-base64token.R).
Tests pass locally with both devtools::test() and R CMD check when the base64 token is in .Renviron. On Travis the 3rd test, in which I write the variable to a file and check that it exists, does not pass: https://travis-ci.org/ropenscilabs/gdoc/jobs/120776471#L574 . This likely has something to do with the local file paths or permissions, but I've yet to figure it out.
So in an attempt to be clever, I tried encoding a
.httr-oauth
token as a base64 string and saving it as an environmental variable in Travis. To test whether this would work at all, I wrote a few short tests to check that the variable is there, non-zero, and that I can create the token from it (https://github.com/ropenscilabs/gdoc/blob/master/tests/testthat/test-base64token.R).Tests pass locally with both
devtools::test()
andR CMD check
when the base64 token is in.Renviron
. On Travis the 3rd test, in which I write the variable to a file and check that it exists, does not pass: https://travis-ci.org/ropenscilabs/gdoc/jobs/120776471#L574 . This likely has something to do with the local file paths or permissions, but I've yet to figure it out.