Closed etiennebacher closed 2 years ago
Thanks a lot for the feedback, indeed I don't have much experience writing tests. I separated the tests for CRAN and travis and removed some of them
That's much better now.
Do you know how to fix the check errors on Github Actions? e.g. https://github.com/yihui/xfun/pull/56/checks?check_run_id=3488914493 (I'm just asking in case you want to gain more experience; I know how to fix them)
thanks for asking, I'll look at it a bit tomorrow, it's the night here ;)
okay I give up, you can fix it
@etiennebacher A few hint:
Error from available.packages() Error in contrib.url(repos, type) : trying to use CRAN without setting a mirror
This means somewhere the CRAN mirror is needed but unset (Options repos
is not set)
You may need to pass it in a function or set the option. On interactive R session, you would be asked for a CRAN mirror. Inside RSTUDIO IDE, you don't have the issue because the IDE sets one by default for you.
I think it could be in this test https://github.com/yihui/xfun/pull/56/files#diff-753ce45f57bf1e464964d20def167f7db377a87465e551a021296241ed27fd1aR4
I let you dig into that 😉
Thanks for the hint @cderv, R cmd check succeeds now. But I'm wondering whether options(repos = c(CRAN = "https://cran.rstudio.com"))
should be put in test-travis.R
instead, so that it is only needed to call it once, even if multiple tests require this repo option.
Yes I agree. It could probably even be configured at the travis level also I believe... 🤔
Seems to work with repo options in test-travis.R
I hope this helps, #5