Skip to content

Commit

Permalink
Examples using renv use r-version: renv for setup-r (#980)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi authored Feb 19, 2025
1 parent e847a14 commit 32869cb
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 6 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>/org-upload-token` where `<org>` 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>/org-upload-token` where `<org>`
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.

``` yaml
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions examples/blogdown-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions examples/blogdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions examples/bookdown-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions examples/bookdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions examples/render-rmarkdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions examples/shiny-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 32869cb

Please sign in to comment.