From aaac687cd9188a5334d3e9f2d8a3920db7f924cf Mon Sep 17 00:00:00 2001
From: Delaigue Olivier <olivier.delaigue@irstea.fr>
Date: Sat, 28 Nov 2020 11:05:24 +0100
Subject: [PATCH] ci: move the chack script to check the installed packages in
 the yml file Refs #29

---
 .gitlab-ci.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bd2fd9a..4a5ea1e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,6 +8,7 @@ default:
     - echo "setwd(\"$(pwd)\")" > .Rprofile
     - PATH=~/R/sources/R-${R_VERSION}/bin:$PATH
     - rename "s/${R_VERSION}.airGRteaching/airGRteaching/" *.tar.gz
+    - R -e 'chooseCRANmirror(graphics = F, ind = 1); pkg <- c("dygraphs", "plotrix", "shiny", "shinyjs"); pkgInst <- installed.packages()[, "Package"]; pkgMiss <- setdiff(pkg, pkgInst); if (length(pkgMiss) > 0) install.packages(pkgMiss)'
 
 .update_packages:
   stage: update_packages
@@ -16,7 +17,7 @@ default:
       - tags
       - schedules
   script:
-    - Rscript -e 'pkg <- c("dygraphs", "plotrix", "shiny", "shinyjs");pkgInst <- installed.packages()[, "Package"];pkgMiss <- setdiff(pkg, pkgInst);if (length(pkgMiss) > 0) install.packages(pkgMiss)'
+    - 
     - Rscript -e "update.packages(ask=FALSE, repos=\"http://cran.r-project.org\")"
 
 .build:
-- 
GitLab