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 @@ ...@@ -8,3 +8,4 @@
^\.gitlab-ci\.yml$ ^\.gitlab-ci\.yml$
^\.vscode$ ^\.vscode$
^Rplots\.pdf$ ^Rplots\.pdf$
^ci$
...@@ -4,6 +4,11 @@ stages: ...@@ -4,6 +4,11 @@ stages:
- regression - regression
- tests - 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: default:
before_script: before_script:
- echo "setwd(\"$(pwd)\")" > .Rprofile - echo "setwd(\"$(pwd)\")" > .Rprofile
...@@ -40,17 +45,23 @@ default: ...@@ -40,17 +45,23 @@ default:
- Rscript tests/testthat/regression_tests.R dev - Rscript tests/testthat/regression_tests.R dev
- Rscript tests/testthat/regression_tests.R compare - Rscript tests/testthat/regression_tests.R compare
.check_not_cran: .check:
stage: tests 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: variables:
NOT_CRAN: "true" NOT_CRAN: "true"
script: AS_CRAN: "false"
- R CMD check airGR_*.tar.gz extends: .check
.check_as_cran: .check_as_cran:
stage: tests variables:
script: NOT_CRAN: "false"
- R CMD check --as-cran airGR_*.tar.gz AS_CRAN: "true"
extends: .check
update_packages_patched: update_packages_patched:
variables: variables:
...@@ -156,4 +167,3 @@ check_as_cran_oldrel: ...@@ -156,4 +167,3 @@ check_as_cran_oldrel:
variables: variables:
R_VERSION: "oldrel" R_VERSION: "oldrel"
extends: .check_as_cran 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