Skip to content

Commit b83c228

Browse files
committed
Update R-CMD-check.yaml
1 parent c9e4df4 commit b83c228

1 file changed

Lines changed: 16 additions & 55 deletions

File tree

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

Lines changed: 16 additions & 55 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/master/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,64 +18,29 @@ 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", http-user-agent: "R/4.1.0 (ubuntu-20.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
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

34+
- uses: r-lib/actions/setup-pandoc@v1
35+
3836
- uses: r-lib/actions/setup-r@v1
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-
uses: actions/cache@v2
42+
- uses: r-lib/actions/setup-r-dependencies@v1
5343
with:
54-
path: ${{ env.R_LIBS_USER }}
55-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
56-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
44+
extra-packages: rcmdcheck
5745

58-
- name: Install system dependencies
59-
if: runner.os == 'Linux'
60-
run: |
61-
while read -r cmd
62-
do
63-
eval sudo $cmd
64-
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
65-
66-
- name: Install dependencies
67-
run: |
68-
remotes::install_deps(dependencies = TRUE)
69-
remotes::install_cran("rcmdcheck")
70-
shell: Rscript {0}
71-
72-
- name: Check
73-
env:
74-
_R_CHECK_CRAN_INCOMING_REMOTE_: false
75-
run: |
76-
options(crayon.enabled = TRUE)
77-
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
78-
shell: Rscript {0}
79-
80-
- name: Upload check results
81-
if: failure()
82-
uses: actions/upload-artifact@main
83-
with:
84-
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
85-
path: check
46+
- uses: r-lib/actions/check-r-package@v1

0 commit comments

Comments
 (0)