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
33on :
44 push :
5- branches :
6- - main
7- - master
5+ branches : [main, master]
86 pull_request :
9- branches :
10- - main
11- - master
12- schedule :
13- - cron : ' 0 0 * * *'
147
15- name : R-CMD-check
8+ name : R-CMD-check.yaml
9+
10+ permissions : read-all
1611
1712jobs :
1813 R-CMD-check :
@@ -24,70 +19,33 @@ jobs:
2419 fail-fast : false
2520 matrix :
2621 config :
22+ - {os: macos-latest, r: 'release'}
2723 - {os: windows-latest, r: 'release'}
28- - {os: macOS -latest, r : 'release'}
29- - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
30- - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
24+ - {os: ubuntu -latest, r: 'devel', http-user-agent : 'release'}
25+ - {os: ubuntu-latest, r: 'release'}
26+ - {os: ubuntu-latest, r: 'oldrel-1' }
3127
3228 env :
33- R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
34- RSPM : ${{ matrix.config.rspm }}
3529 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
30+ R_KEEP_PKG_SOURCE : yes
3631
3732 steps :
38- - uses : actions/checkout@v2
33+ - uses : actions/checkout@v4
34+
35+ - uses : r-lib/actions/setup-pandoc@v2
3936
40- - uses : r-lib/actions/setup-r@v1
37+ - uses : r-lib/actions/setup-r@v2
4138 with :
4239 r-version : ${{ matrix.config.r }}
40+ http-user-agent : ${{ matrix.config.http-user-agent }}
41+ use-public-rspm : true
4342
44- - uses : r-lib/actions/setup-pandoc@v1
45-
46- - name : Query dependencies
47- run : |
48- install.packages('remotes')
49- saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
50- writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
51- shell : Rscript {0}
52-
53- - name : Restore R package cache
54- if : runner.os != 'Windows'
55- uses : actions/cache@v2
43+ - uses : r-lib/actions/setup-r-dependencies@v2
5644 with :
57- path : ${{ env.R_LIBS_USER }}
58- key : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
59- restore-keys : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
60-
61- - name : Install system dependencies
62- if : runner.os == 'Linux'
63- run : |
64- while read -r cmd
65- do
66- eval sudo $cmd
67- done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
68-
69- - name : Install dependencies
70- run : |
71- remotes::install_deps(dependencies = TRUE)
72- remotes::install_cran("rcmdcheck")
73- shell : Rscript {0}
74-
75- - name : Configure Git user
76- run : |
77- git config --global user.email "ghau@example.com"
78- git config --global user.name "GitHub Actions User"
79-
80- - name : Check
81- env :
82- _R_CHECK_CRAN_INCOMING_REMOTE_ : false
83- run : |
84- options(crayon.enabled = TRUE)
85- rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
86- shell : Rscript {0}
45+ extra-packages : any::rcmdcheck
46+ needs : check
8747
88- - name : Upload check results
89- if : failure()
90- uses : actions/upload-artifact@main
48+ - uses : r-lib/actions/check-r-package@v2
9149 with :
92- name : ${{ runner.os }}-r${{ matrix.config.r }}-results
93- path : check
50+ upload-snapshots : true
51+ build_args : ' c("--no-manual","--compact-vignettes=gs+qpdf") '
0 commit comments