From 32869cbf713de1a74b80d8413e51a04456ea11e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Wed, 19 Feb 2025 19:18:42 +0100 Subject: [PATCH] Examples using renv use `r-version: renv` for `setup-r` (#980) --- NEWS.md | 4 ++++ examples/README.md | 18 ++++++++++++------ examples/blogdown-gh-pages.yaml | 1 + examples/blogdown.yaml | 1 + examples/bookdown-gh-pages.yaml | 1 + examples/bookdown.yaml | 1 + examples/render-rmarkdown.yaml | 2 ++ examples/shiny-deploy.yaml | 1 + 8 files changed, 23 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index c5222af83..4e277e7e9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,10 @@ does not have binary packages for aarch64 Linux, and it would send x86_64 binarires for aarch64 systems as well. +* Example workflows that use renv now call `setup-r` with + `r-version: renv`, to install the R version declared in the + `renv.lock` file. + # `v2.11.1` (2024-11-25) * `[setup-r]` now unlinks the pre-installed pkg-config brew package diff --git a/examples/README.md b/examples/README.md index d08f1abac..f3e5086d0 100644 --- a/examples/README.md +++ b/examples/README.md @@ -278,12 +278,11 @@ results to GitHub, like the example here, then you can also use a global organization token in an organization secret called `CODECOV_TOKEN`. This way you can avoid having to add a secret to each repository of your organization. You can find this token at -`https://app.codecov.io/account/gh//org-upload-token` where `` is -your GitHub organization. E.g. for `r-lib` it is at -https://app.codecov.io/account/gh/r-lib/org-upload-token. -To see it, you'll need log in to Codecov, and you need to be a Codecov -admin for the organization. - +`https://app.codecov.io/account/gh//org-upload-token` where `` +is your GitHub organization. E.g. for `r-lib` it is at +. To see it, +you’ll need log in to Codecov, and you need to be a Codecov admin for +the organization. ``` yaml # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples @@ -531,6 +530,8 @@ jobs: - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-r@v2 + with: + r-version: renv - uses: r-lib/actions/setup-renv@v2 @@ -817,6 +818,7 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true + r-version: renv - uses: r-lib/actions/setup-renv@v2 @@ -876,6 +878,7 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true + r-version: renv - uses: r-lib/actions/setup-renv@v2 @@ -968,6 +971,7 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true + r-version: renv - uses: r-lib/actions/setup-renv@v2 @@ -1024,6 +1028,7 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true + r-version: renv - uses: r-lib/actions/setup-renv@v2 @@ -1108,6 +1113,7 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true + r-version: renv - uses: r-lib/actions/setup-renv@v2 diff --git a/examples/blogdown-gh-pages.yaml b/examples/blogdown-gh-pages.yaml index 6bf755b30..6802e236d 100644 --- a/examples/blogdown-gh-pages.yaml +++ b/examples/blogdown-gh-pages.yaml @@ -26,6 +26,7 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true + r-version: renv - uses: r-lib/actions/setup-renv@v2 diff --git a/examples/blogdown.yaml b/examples/blogdown.yaml index 230c7547a..abd2c66f3 100644 --- a/examples/blogdown.yaml +++ b/examples/blogdown.yaml @@ -28,6 +28,7 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true + r-version: renv - uses: r-lib/actions/setup-renv@v2 diff --git a/examples/bookdown-gh-pages.yaml b/examples/bookdown-gh-pages.yaml index e065df226..d740aac93 100644 --- a/examples/bookdown-gh-pages.yaml +++ b/examples/bookdown-gh-pages.yaml @@ -26,6 +26,7 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true + r-version: renv - uses: r-lib/actions/setup-renv@v2 diff --git a/examples/bookdown.yaml b/examples/bookdown.yaml index 0dde8e362..bd3aedd0c 100644 --- a/examples/bookdown.yaml +++ b/examples/bookdown.yaml @@ -28,6 +28,7 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true + r-version: renv - uses: r-lib/actions/setup-renv@v2 diff --git a/examples/render-rmarkdown.yaml b/examples/render-rmarkdown.yaml index 51ba8eade..972c0c8a5 100644 --- a/examples/render-rmarkdown.yaml +++ b/examples/render-rmarkdown.yaml @@ -24,6 +24,8 @@ jobs: - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-r@v2 + with: + r-version: renv - uses: r-lib/actions/setup-renv@v2 diff --git a/examples/shiny-deploy.yaml b/examples/shiny-deploy.yaml index bba3952f9..eb525da83 100644 --- a/examples/shiny-deploy.yaml +++ b/examples/shiny-deploy.yaml @@ -21,6 +21,7 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true + r-version: renv - uses: r-lib/actions/setup-renv@v2