From 5951250ef58dba5e36270e4ecc03a3e43fd9e2ea Mon Sep 17 00:00:00 2001
From: Dorchies David <david.dorchies@irstea.fr>
Date: Mon, 23 Nov 2020 10:35:56 +0100
Subject: [PATCH] ci: debugging regression tests

- Directly run regression tests in regression stage instead of check_not_cran stage

Refs #69
---
 .gitlab-ci.yml | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4b1828ba..30f77f2b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -33,17 +33,16 @@ default:
 
 .regression:
   stage: regression
-  only:
-    refs:
-      - schedules
+#  only:
+#    refs:
+#      - schedules
+  variables:
+    NOT_CRAN: "true"
   script:
     - Rscript -e 'source("tests/testthat/store_examples.R"); StoreRefExampleResults("airGR");'
     - R CMD INSTALL .
     - Rscript -e 'source("tests/testthat/store_examples.R"); StoreTestExampleResults("airGR");'
-  artifacts:
-    paths:
-      - tests/tmp/
-    expire_in: 1 week
+    - Rscript -e 'res <- testthat::test_file("tests/testthat/test-regression.R"); dRes = as.data.frame(res); if(any(dRes[,"failed"]>0) | any(dRes[,"error"])) {quit(status = 1)};'
 
 .check_not_cran:
   stage: tests
-- 
GitLab