Hi folks,
I've got an issue where devtool::test()
passes, but devtools::check()
does not. In addition to this, my GitHub Actions all pass, but the failures I get only occur on devtools::check()
locally.
I've read through some of the past topics that describe this issue:
- devtools::test passes but devtools::check fails - #2 by maelle
- shinytest passing on devtools::test() but failing on devtools::check() - #4 by t.bowling
- testthat fails within devtools::check but works in devtools::test
- devtools::test() succeeds, while devtools::check() fails
- devtools::check() Warning in system(cmd) : 'make' not found but I have RTools installed.
As well as the GitHub Issue thread on this topic: Usual Suspects for specific failure modes ยท Issue #483 ยท hadley/r-pkgs ยท GitHub
Some of the things I've tried include:
- Running
R CMD build
thenR CMD check --as-cran
- this showed no errors. Although we do skip a bunch of tests on CRAN since we cannot get tensorflow installed on CRAN - removing all
source()
calls inside tests (this has resulted in other tests failing, but not the same test errors I am getting) - removed unnecessary
library()
calls from inside tests (commit) and from testthat.R file (commit)
Some things that I suspect could be the issue:
- There are still some uses of accessing unexported functions from the
greta
package, e.g.,greta:::check_op
- There is a
helpers.R
file inside the testthat folder which callslibrary(fields)
andlibrary(tensorflow)
which might upset things, potentially? - Inside every
test_that()
call,greta
will check for a python installation, and sometimes it does not find it. I'm wondering if perhaps something is happening there.
Overall, the issue is that I get about 248 tests failing due to a Python environment not being found, but only on devtools::check()
and not devtools::test()
(these all pass fine)
This doesn't happen on GH actions, only locally.
Any suggestions are very welcome!
Current process is here: