11on :
22 schedule :
3- - cron : ' 17 13 22 * *' # 22nd of month at 13:17 UTC
3+ - cron : ' 17 13 23 * *' # 22nd of month at 13:17 UTC
44
55# A more complete suite of checks to run monthly; each PR/merge need not pass all these, but they should pass before CRAN release
66name : R-CMD-check-occasional
4545
4646 env :
4747 R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
48- TEST_DATA_TABLE_WITH_OTHER_PACKAGES : true
4948 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
5049
5150 steps :
8584 if : matrix.os == 'macOS-latest'
8685 run : brew install gdal proj
8786
88- - name : Query dependencies
89- run : |
90- install.packages('remotes')
91- saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
92- writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
93- shell : Rscript {0}
94-
95- - name : Restore R package cache
96- uses : actions/cache@v2
97- with :
98- path : ${{ env.R_LIBS_USER }}
99- key : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
100- restore-keys : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
101-
10287 - name : Install system dependencies
10388 if : runner.os == 'Linux'
10489 run : |
@@ -109,12 +94,12 @@ jobs:
10994
11095 - name : Install dependencies
11196 run : |
112- remotes::install_deps(dependencies = TRUE)
97+ remotes::install_deps(dependencies=TRUE, force= TRUE)
11398 other_deps_expr = parse('inst/tests/other.Rraw', n=1L)
11499 eval(other_deps_expr)
115100 pkgs <- get(as.character(other_deps_expr[[1L]][[2L]]))
116101 # May not install on oldest R versions
117- try(remotes::install_cran(c(pkgs, "rcmdcheck")))
102+ try(remotes::install_cran(c(pkgs, "rcmdcheck"), force=TRUE ))
118103 shell : Rscript {0}
119104
120105 - name : Check
@@ -137,12 +122,13 @@ jobs:
137122
138123 other_deps_expr = parse('inst/tests/other.Rraw', n=1L)
139124 eval(other_deps_expr)
140- pkgs <- get(as.character(other_deps_expr[[1L]][[2L]]))
141- has_pkg <- sapply(pkgs, requireNamespace, quietly=TRUE)
142- if (!all(has_pkg)) {
125+ pkgs = get(as.character(other_deps_expr[[1L]][[2L]]))
126+ has_pkg = sapply(pkgs, requireNamespace, quietly=TRUE)
127+ run_other = all(has_pkg)
128+ if (!run_other) {
143129 cat(sprintf("Skipping other.Rraw since some required packages are not available: %s\n", toString(pkgs[!has_pkg])))
144- Sys.unsetenv("TEST_DATA_TABLE_WITH_OTHER_PACKAGES")
145130 }
131+ Sys.setenv(TEST_DATA_TABLE_WITH_OTHER_PACKAGES=as.character(run_other))
146132
147133 do_vignettes <- requireNamespace("knitr", quietly=TRUE)
148134
@@ -155,6 +141,8 @@ jobs:
155141 system2(Rbin, c("CMD", "build", ".", vignette_args))
156142 dt_tar <- list.files(pattern = "^data[.]table_.*[.]tar[.]gz$")
157143 if (!length(dt_tar)) stop("Built tar.gz not found among: ", toString(list.files()))
144+ # --no-build-vignettes is not enough for R CMD check
145+ if (!do_vignettes) args <- c(args, "--ignore-vignettes")
158146 res = system2(Rbin, c("CMD", "check", dt_tar[1L], args), stdout=TRUE)
159147 if (!is.null(attr(res, "status")) || grep("^Status:.*(ERROR|WARNING)", res)) {
160148 writeLines(res)
0 commit comments