Add gitlab ci test
Change-Id: If4078b90950a4bf9379c6eb2bc63d90a2aa8a208
diff --git a/.gitignore b/.gitignore
index f51ef92..e652dd2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
.RData
.Ruserdata
cache/
+!.gitlab-ci.yml
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..48658fa
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,25 @@
+# use the tidyverse rocker image, as it contains devtools preinstalled
+image: rocker/tidyverse
+
+# define stages of runner. at the moment,
+# just test and build (no deploy).
+stages:
+ - test
+ - build
+
+# define test job
+test-job:
+ stage: test
+ script:
+ # run the R CMD check on the package (this path)
+ - R CMD BUILD . && R CMD CHECK $(ls -t . | head -n1)
+ # run the devtools test
+ # - R -e 'devtools::test()'
+
+build-job:
+ stage: build
+ before_script:
+ - apt-get update && apt-get install -y build-essential libglpk40 libxt6
+ script:
+ # install
+ - R -e 'devtools::install()'