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
13on :
24 push :
3- branches :
4- - master
5+ branches : [main, master]
56 pull_request :
6- branches :
7- - master
7+ branches : [main, master]
88
99name : R-CMD-check
1010
@@ -20,62 +20,35 @@ jobs:
2020 config :
2121 - {os: macOS-latest, r: 'release'}
2222 - {os: windows-latest, r: 'release'}
23- - {os: windows-latest, r: 'oldrel'}
24- # - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
25- # - {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
26- - {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'}
2726
2827 env :
29- MAKEFLAGS : " -j 2"
30- R_BUILD_ARGS : " --no-build-vignettes"
31- R_CHECK_ARGS : " --no-build-vignettes"
32- _R_CHECK_FORCE_SUGGESTS : 0
33- R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
34- RSPM : ${{ matrix.config.rspm }}
3528 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
29+ R_KEEP_PKG_SOURCE : yes
3630
3731 steps :
3832 - uses : actions/checkout@v2
3933
40- - uses : r-lib/actions/setup-r@master
34+ - uses : r-lib/actions/setup-pandoc@v1
35+
36+ - uses : r-lib/actions/setup-r@v1
4137 with :
4238 r-version : ${{ matrix.config.r }}
39+ http-user-agent : ${{ matrix.config.http-user-agent }}
40+ use-public-rspm : true
4341
44- - uses : r-lib/actions/setup-pandoc@master
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 : Cache R packages
54- if : runner.os != 'Windows'
55- uses : actions/cache@v1
42+ - uses : r-lib/actions/setup-r-dependencies@v1
5643 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-
44+ extra-packages : rcmdcheck
6045
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 'cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")')
68- - name : Install dependencies
69- run : |
70- remotes::install_deps(dependencies = TRUE)
71- remotes::install_cran("rcmdcheck")
72- shell : Rscript {0}
46+ - uses : r-lib/actions/check-r-package@v1
7347
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}
48+ - name : Show testthat output
49+ if : always()
50+ run : find check -name 'testthat.Rout*' -exec cat '{}' \; || true
51+ shell : bash
7952
8053 - name : Upload check results
8154 if : failure()
0 commit comments