Skip to content

Latest commit

 

History

History

setup-renv

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

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. To skip the use of the GitHub cache completely (such as for local testing), set to true.
  • 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!