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
7+ branches : [main, master]
128
139name : R-CMD-check
1410
11+ env :
12+ GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
13+
1514jobs :
1615 R-CMD-check :
1716 runs-on : ${{ matrix.config.os }}
@@ -22,62 +21,40 @@ jobs:
2221 fail-fast : false
2322 matrix :
2423 config :
24+ - {os: macOS-latest, r: 'release'}
2525 - {os: windows-latest, r: 'release'}
26- - {os: macOS-latest, r: 'release'}
27- - {os: ubuntu-latest, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
28- - {os: ubuntu-latest, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
29- - {os: ubuntu-latest, r: 'devel', valgrind: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
26+ - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
27+ - {os: ubuntu-latest, r: 'release'}
28+ - {os: ubuntu-latest, r: 'devel', valgrind: true, http-user-agent: 'release'}
3029
3130 env :
32- R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
33- RSPM : ${{ matrix.config.rspm }}
3431 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
32+ R_KEEP_PKG_SOURCE : yes
3533
3634 steps :
3735 - uses : actions/checkout@v4
3836
37+ - uses : r-lib/actions/setup-pandoc@v2
38+
3939 - uses : r-lib/actions/setup-r@v2
4040 with :
4141 r-version : ${{ matrix.config.r }}
42+ http-user-agent : ${{ matrix.config.http-user-agent }}
43+ use-public-rspm : true
4244
43- - uses : r-lib/actions/setup-pandoc@v2
44-
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 : Restore R package cache
53- if : runner.os != 'Windows'
54- uses : actions/cache@v4
45+ - uses : r-lib/actions/setup-r-dependencies@v2
5546 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- - name : Install dependencies
68- run : |
69- remotes::install_deps(dependencies = TRUE)
70- remotes::install_cran("rcmdcheck")
71- shell : Rscript {0}
47+ extra-packages : any::rcmdcheck
48+ needs : check
7249
73- - name : Check
50+ - uses : r-lib/actions/check-r-package@v2
7451 if : ${{ matrix.config.valgrind != true }}
75- env :
76- _R_CHECK_CRAN_INCOMING_REMOTE_ : false
77- run : |
78- options(crayon.enabled = TRUE)
79- rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "error", check_dir = " check")
80- shell : Rscript {0}
52+ with :
53+ args : ' c("--no-manual", "--as-cran") '
54+ upload-snapshots : false
55+ upload-results : false
56+ check-dir : ' " check"'
57+ error-on : ' "error" '
8158
8259 - name : Setup valgrind
8360 if : ${{ matrix.config.valgrind == true }}
0 commit comments