Skip to content

Files

Latest commit

 

History

History

setup-renv

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Aug 26, 2021
Nov 6, 2024
Nov 6, 2024

setup-renv

RStudio community

This action installs dependencies for the current R environment based on the renv lockfile in the repository by:

Usage

Inputs available

  • profile - default NULL. The renv profile that should be activated. Forwarded to renv::activate(). It must be an R expression. Note that you often need to quote it, see details below.
  • cache-version - default 1. If you need to invalidate the existing cache pass any other number and a new cache will be used.
  • bypass-cache - default false. Whether attempts to cache should be completely skipped (for non GitHub testing). Set to true to skip. If "never" is provided, the package cache will be saved even if the workflow fails. (For historical reasons the "always" value is equivalent to "never".)
  • working-directory - default '.'. If the renv.lock file is not in the root directory of your repository.

Example:

steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-renv@v2
  with:
    profile: '"shiny"'

Quoting R expressions

The profile input parameter must be specified as an R expression. This increases flexibility, but it also causes some inconvenience, since these expressions often need to be quoted in the YAML file. A handy tip is that if your R expression does not contain a single quote, and you specify it in the YAML in a single line, surrounded by single quotes (like in the example above for profile), that will work.

License

The scripts and documentation in this project are released under the MIT License

Contributions

Contributions are welcome!