Skip to content

Commit 641e0dd

Browse files
committed
action
1 parent c67e7a7 commit 641e0dd

File tree

1 file changed

+6
-31
lines changed

1 file changed

+6
-31
lines changed

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

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -41,43 +41,18 @@ jobs:
4141

4242
- uses: r-lib/actions/setup-pandoc@v2
4343

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: Cache R packages
52-
if: runner.os != 'Windows'
53-
uses: actions/cache@v3
54-
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-
5944
- name: Install system dependencies
6045
if: runner.os == 'Linux'
6146
run: |
6247
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
6348
sudo apt update
6449
sudo apt install libcurl4-openssl-dev
6550
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: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
76-
shell: Rscript {0}
51+
- uses: r-lib/actions/setup-r-dependencies@v2
52+
with:
53+
extra-packages: any::rcmdcheck
54+
needs: check
7755

78-
- name: Upload check results
79-
if: failure()
80-
uses: actions/upload-artifact@main
56+
- uses: r-lib/actions/check-r-package@v2
8157
with:
82-
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
83-
path: check
58+
upload-snapshots: true

0 commit comments

Comments
 (0)