From ca57f16692e6d3b92d313051bd7207baf396d340 Mon Sep 17 00:00:00 2001
From: Rafael <rpd17@inf.ufpr.br>
Date: Mon, 9 Jul 2018 08:46:50 -0300
Subject: [PATCH] Issue #58: Add a new stage of test in gitlab-ci

Signed-off-by: Rafael <rpd17@inf.ufpr.br>
---
 .gitlab-ci.yml                                | 25 +++++++++++++++----
 config/ci_monet_test.env.example              |  7 ++++++
 ...v.example => ci_postgres_test.env.example} |  0
 3 files changed, 27 insertions(+), 5 deletions(-)
 create mode 100644 config/ci_monet_test.env.example
 rename config/{ci_test.env.example => ci_postgres_test.env.example} (100%)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a69226a5..77635187 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,13 +2,17 @@ image: node:6.12.2
 
 services:
     - postgres:latest
+    - 
+        name: "dockerregistry.c3sl.ufpr.br:5000/c3sl/monetdb-ci-service:latest"
+        alias: "monet"
 
 variables:
     POSTGRES_DB: 'blendb_fixture'
     POSTGRES_USER: 'runner'
     POSTGRES_PASSWORD: ''
+    MONETDB_NAME: 'blendb_fixture'
     PKG_VERSION: 'latest'
-    DOCKER_URL: 'marula.c3sl.ufpr.br:5000/c3sl/blendb:'
+    DOCKER_URL: 'dockerregistry.c3sl.ufpr.br:5000/c3sl/blendb:'
 
 cache:
     paths:
@@ -20,18 +24,29 @@ stages:
     - deploy
 
 
-run_tests:
+run_test_postgres:
     stage: test
-    before_script:
+    script:                
         - yarn install --frozen-lockfile --silent --non-interactive
-    script:
         - mv config/ci_test.yaml.example config/test.yaml
-        - mv config/ci_test.env.example config/test.env
+        - mv config/ci_postgres_test.env.example config/test.env
         - yarn test
         - yarn run lint
     tags:
         - node
         - postgres
+
+run_test_monet:
+    stage: test
+    script: 
+        - yarn install --frozen-lockfile --silent --non-interactive
+        - mv config/ci_test.yaml.example config/test.yaml
+        - mv config/ci_monet_test.env.example config/test.env
+        - yarn test
+        - yarn run lint
+    tags:
+        - node
+
 build:
     stage: build
     variables:
diff --git a/config/ci_monet_test.env.example b/config/ci_monet_test.env.example
new file mode 100644
index 00000000..2bec39d9
--- /dev/null
+++ b/config/ci_monet_test.env.example
@@ -0,0 +1,7 @@
+BLENDB_DB_USER=monetdb
+BLENDB_DB_NAME=blendb_fixture
+BLENDB_DB_PASSWORD=monetdb
+BLENDB_DB_HOST=monet
+BLENDB_DB_PORT=50000
+BLENDB_ADAPTER=monet
+PORT=3000
diff --git a/config/ci_test.env.example b/config/ci_postgres_test.env.example
similarity index 100%
rename from config/ci_test.env.example
rename to config/ci_postgres_test.env.example
-- 
GitLab