actions
actions copied to clipboard
Notes on a `noSuggests`-like workflow
Example workflow for yardstick: https://github.com/tidymodels/yardstick/pull/281/files
A few notes:
- Running with
cache: false
to avoid accidentally restoring Suggested dependencies from a pre-existing cache. Using RSPM means this isn't that painful. We could also use the cache and somehow trim down the resulting library of packages to only what is in the pak lockfile. - Only running on Linux with r-release (because of
cache: false
) - Sets
dependencies: '"hard"'
to install Depends, Imports, LinkingTo dependencies, but not Suggests. Suggests dependencies can still be implicitly installed if they are required by any of the hard dependencies. - Always installs testthat, knitr, and rmarkdown to be able to run tests and build vignettes. We know the
noSuggests
build installs testthat, but I imagine it also installs knitr/rmarkdown too.
In fundiversity, we leverage the power on the new _R_CHECK_DEPENDS_ONLY_TESTS_
environment variable to do this: https://github.com/Bisaloo/fundiversity/pull/49
As documented, testing packages (testthat, tinytest, etc.) are still automatically installed.
We have not really paid attention to the cache issue but it seems that it's still working in spite of this because tests dependent on suggested packages (e.g., memoise) are still skipped in this job.
You can also test setting this env var locally and it will work despite having all the packages in your library.
This requires r-devel
at the moment because it was introduced in R 4.2.0.
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue