Commit cb03eda3 authored by Dorchies David's avatar Dorchies David
Browse files

ci: checks with warning should fail

Refs #86
Showing with 18 additions and 7 deletions
+18 -7
......@@ -8,3 +8,4 @@
^\.gitlab-ci\.yml$
^\.vscode$
^Rplots\.pdf$
^ci$
......@@ -4,6 +4,11 @@ stages:
- regression
- tests
variables:
R_LIBS_USER: "$CI_PROJECT_DIR/ci/lib"
CHECK_DIR: "$CI_PROJECT_DIR/ci/logs"
BUILD_LOGS_DIR: "$CI_PROJECT_DIR/ci/logs/$CI_PROJECT_NAME.Rcheck"
default:
before_script:
- echo "setwd(\"$(pwd)\")" > .Rprofile
......@@ -40,17 +45,23 @@ default:
- Rscript tests/testthat/regression_tests.R dev
- Rscript tests/testthat/regression_tests.R compare
.check_not_cran:
.check:
stage: tests
script:
- R -e 'devtools::check(check_dir = Sys.getenv("CHECK_DIR"), cran = !as.logical(Sys.getenv("AS_CRAN")))'
- R -e 'if (length(devtools::check_failures(path = Sys.getenv("BUILD_LOGS_DIR"), note = FALSE)) > 0) stop()'
.check_not_cran:
variables:
NOT_CRAN: "true"
script:
- R CMD check airGR_*.tar.gz
AS_CRAN: "false"
extends: .check
.check_as_cran:
stage: tests
script:
- R CMD check --as-cran airGR_*.tar.gz
variables:
NOT_CRAN: "false"
AS_CRAN: "true"
extends: .check
update_packages_patched:
variables:
......@@ -156,4 +167,3 @@ check_as_cran_oldrel:
variables:
R_VERSION: "oldrel"
extends: .check_as_cran
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment