Skip to content

Commit 4511f52

Browse files
committed
usethis::use_github_action_check_standard()
1 parent 26a1804 commit 4511f52

File tree

3 files changed

+23
-60
lines changed

3 files changed

+23
-60
lines changed

‎.github/workflows/R-CMD-check.yaml‎

Lines changed: 19 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
2-
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
5-
branches:
6-
- main
7-
- master
5+
branches: [main, master]
86
pull_request:
9-
branches:
10-
- main
11-
- master
7+
branches: [main, master]
128

139
name: R-CMD-check
1410

@@ -22,65 +18,32 @@ jobs:
2218
fail-fast: false
2319
matrix:
2420
config:
21+
- {os: macOS-latest, r: 'release'}
2522
- {os: windows-latest, r: 'release'}
26-
- {os: macOS-latest, r: 'release'}
27-
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
28-
# - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
23+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
24+
- {os: ubuntu-latest, r: 'release'}
25+
- {os: ubuntu-latest, r: 'oldrel-1'}
2926

3027
env:
31-
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
32-
RSPM: ${{ matrix.config.rspm }}
3328
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
29+
R_KEEP_PKG_SOURCE: yes
3430

3531
steps:
3632
- uses: actions/checkout@v2
3733

38-
- uses: r-lib/actions/setup-r@v1
34+
- uses: r-lib/actions/setup-pandoc@v2
35+
36+
- uses: r-lib/actions/setup-r@v2
3937
with:
4038
r-version: ${{ matrix.config.r }}
39+
http-user-agent: ${{ matrix.config.http-user-agent }}
40+
use-public-rspm: true
4141

42-
- uses: r-lib/actions/setup-pandoc@v1
43-
44-
- name: Query dependencies
45-
run: |
46-
install.packages('remotes')
47-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
48-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
49-
shell: Rscript {0}
50-
51-
- name: Restore R package cache
52-
if: runner.os != 'Windows'
53-
uses: actions/cache@v2
42+
- uses: r-lib/actions/setup-r-dependencies@v2
5443
with:
55-
path: ${{ env.R_LIBS_USER }}
56-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
57-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
58-
59-
- name: Install system dependencies
60-
if: runner.os == 'Linux'
61-
run: |
62-
while read -r cmd
63-
do
64-
eval sudo $cmd
65-
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
66-
67-
- name: Install dependencies
68-
run: |
69-
remotes::install_deps(dependencies = TRUE)
70-
remotes::install_cran("rcmdcheck")
71-
shell: Rscript {0}
72-
73-
- name: Check
74-
env:
75-
_R_CHECK_CRAN_INCOMING_REMOTE_: false
76-
run: |
77-
options(crayon.enabled = TRUE)
78-
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
79-
shell: Rscript {0}
44+
extra-packages: any::rcmdcheck
45+
needs: check
8046

81-
- name: Upload check results
82-
if: failure()
83-
uses: actions/upload-artifact@main
47+
- uses: r-lib/actions/check-r-package@v2
8448
with:
85-
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
86-
path: check
49+
upload-snapshots: true

‎README.Rmd‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ knitr::opts_chunk$set(
1717

1818
<!-- badges: start -->
1919
[![CRAN status](https://www.r-pkg.org/badges/version/wateRinfo)](https://CRAN.R-project.org/package=wateRinfo)
20-
[![R-CMD-check](https://github.com/ropensci/wateRinfo/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/wateRinfo/actions)
20+
[![R-CMD-check](https://github.com/inbo/wateRinfo/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/inbo/wateRinfo/actions/workflows/R-CMD-check.yaml)
2121
[![codecov](https://codecov.io/gh/ropensci/wateRinfo/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ropensci/wateRinfo/)
2222
[![repo status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
2323
[![rOpenSci](https://badges.ropensci.org/255_status.svg)](https://github.com/ropensci/software-review/issues/255)

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
[![CRAN
99
status](https://www.r-pkg.org/badges/version/wateRinfo)](https://CRAN.R-project.org/package=wateRinfo)
10-
[![R-CMD-check](https://github.com/ropensci/wateRinfo/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/wateRinfo/actions)
10+
[![R-CMD-check](https://github.com/inbo/wateRinfo/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/inbo/wateRinfo/actions/workflows/R-CMD-check.yaml)
1111
[![codecov](https://codecov.io/gh/ropensci/wateRinfo/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ropensci/wateRinfo/)
1212
[![repo
1313
status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
@@ -235,12 +235,12 @@ client <- paste0("MzJkY2VlY2UtODI2Yy00Yjk4LTljMmQtYjE2OTc4ZjBjYTZhOjRhZGE4",
235235
my_token <- get_token(client = client)
236236
print(my_token)
237237
#> Token:
238-
#> eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJlZTQyZjZjYi0zMGJhLTRjZTktYTNmNC03NzA0YWVmMzk0Y2IiLCJpYXQiOjE2NTcyMTIwOTQsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9LaVdlYlBvcnRhbC9hdXRoIiwiYXVkIjoiMzJkY2VlY2UtODI2Yy00Yjk4LTljMmQtYjE2OTc4ZjBjYTZhIiwiZXhwIjoxNjU3Mjk4NDk0fQ.I-M-eeyjg9YszInMVyGJNbx5y8ANvziigMJ1bJnX1-I
238+
#> eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJiNTFlM2U5MC1iY2FjLTQ4Y2ItYmNmOS0wM2NmMDIwODA5MDIiLCJpYXQiOjE2NTcyMTI0NTAsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9LaVdlYlBvcnRhbC9hdXRoIiwiYXVkIjoiMzJkY2VlY2UtODI2Yy00Yjk4LTljMmQtYjE2OTc4ZjBjYTZhIiwiZXhwIjoxNjU3Mjk4ODUwfQ.PQv_g2cfrOCdfcpmINZncTAbZgwchzxXwmSjlJU3WIk
239239
#>
240240
#> Attributes:
241241
#> url: http://download.waterinfo.be/kiwis-auth/token
242242
#> type: Bearer
243-
#> expires: 2022-07-08 18:41:34 CEST
243+
#> expires: 2022-07-08 18:47:30 CEST
244244
```
245245

246246
Receive information on the validity of the token:

0 commit comments

Comments
 (0)