Closed AnneMTreasure closed 2 years ago
Look into Docker for ‘virtual environment’ / containerisation for GitHub Actions
Docker too unnecessarily complicated for our needs. Rather used renv
as a way to pin and lock R and R package versions. This is a bit more natural to use than Docker (see conversation on R4DS):
Steps:
Locally, ran renv::init()
, then renv::snapshot()
and then commit and push the created renv.lock file to github
replaced current setup-r-dependencies line (which installs dependencies from the DESCRIPTION file) with setup-renv
:
uses: r-lib/actions/setup-renv@v2 with: cache-version: 2
then added the rest of the github actions steps as per usual (environment variables etc too)
Pin package and R versions