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 :
4- push :
5- branches :
6- - main
7- - master
8- - devel
9- pull_request :
10- branches :
11- - main
12- - master
13- - devel
4+ push :
5+ branches :
6+ - main
7+ - master
8+ - devel
9+ pull_request :
10+ branches :
11+ - main
12+ - master
13+ - devel
1414
15- name : R-CMD-check
15+ name : R-CMD-check.yaml
1616
17- jobs :
18- R-CMD-check :
19- runs-on : ${{ matrix.config.os }}
20-
21- name : ${{ matrix.config.os }} (${{ matrix.config.r }})
22-
23- strategy :
24- fail-fast : false
25- matrix :
26- config :
27- - {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"}
31-
32- env :
33- R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
34- RSPM : ${{ matrix.config.rspm }}
35-
36- steps :
37- - uses : actions/checkout@v2
38-
39- - uses : r-lib/actions/setup-r@v2
40- with :
41- r-version : ${{ matrix.config.r }}
42-
43- - uses : r-lib/actions/setup-pandoc@v2
17+ permissions : read-all
4418
45- - name : Query dependencies
46- run : |
47- install.packages('remotes')
48- saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
49- writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version" )
50- shell : Rscript {0}
51-
52- - name : Cache R packages
53- if : runner.os != 'Windows'
54- uses : actions/cache@v2
55- with :
56- path : ${{ env.R_LIBS_USER } }
57- key : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') } }
58- restore-keys : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
59-
60- - name : Install system dependencies
61- if : runner.os == 'Linux'
62- run : |
63- while read -r cmd
64- do
65- eval sudo $cmd
66- done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
67-
68- - name : Install dependencies
69- run : |
70- remotes::install_deps(dependencies = TRUE)
71- remotes::install_cran("rcmdcheck")
72- shell : Rscript {0}
73-
74- - name : Check
75- env :
76- _R_CHECK_CRAN_INCOMING_REMOTE_ : false
77- run : 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
19+ jobs :
20+ R-CMD-check :
21+ runs-on : ${{ matrix.config.os }}
22+
23+ name : ${{ matrix.config.os }} (${{ matrix.config.r }} )
24+
25+ strategy :
26+ fail-fast : false
27+ matrix :
28+ config :
29+ - {os: windows-latest, r: 'release'}
30+ - {os: macOS-latest, r: 'release' }
31+ - {os: ubuntu-22.04, r: 'release', rspm: "https://packagemanager.posit.co/cran/__linux__/jammy/latest" }
32+ - {os: ubuntu-22.04, r: 'devel', rspm: "https://packagemanager.posit.co/cran/__linux__/jammy/latest"}
33+ - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
34+ - {os: ubuntu-latest, r: 'release'}
35+
36+ env :
37+ GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
38+ R_KEEP_PKG_SOURCE : yes
39+
40+ steps :
41+ - uses : actions/checkout@v4
42+
43+ - uses : r-lib/actions/setup-pandoc@v2
44+
45+ - uses : r-lib/actions/setup-r@v2
46+ with :
47+ r-version : ${{ matrix.config.r }}
48+ http-user-agent : ${{ matrix.config.http-user-agent }}
49+ use-public-rspm : true
50+
51+ - uses : r-lib/actions/setup-r-dependencies@v2
52+ with :
53+ extra-packages : any::rcmdcheck
54+ needs : check
55+
56+ - uses : r-lib/ actions/check-r-package@v2
57+ with :
58+ upload-snapshots : true
59+ build_args : ' c("--no-manual","--compact-vignettes=gs+qpdf") '
0 commit comments