From cb271a5e6a28b889118d71d2a4a8adbecfc70c6f Mon Sep 17 00:00:00 2001
From: Sonia Zorba <sonia.zorba@inaf.it>
Date: Mon, 21 Dec 2020 11:33:18 +0100
Subject: [PATCH] Added backend test in CI

---
 .gitlab-ci.yml | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 37384dc..cb647ba 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,7 +2,19 @@ stages:
   - test
   - dockerize
 
-deploy:
+test_backend:
+  stage: test
+  tags:
+    - docker
+  script:
+    - cd vospace-ui-backend
+    - mvn clean test
+    - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print "coverage=" 100*covered/instructions }' target/site/jacoco/jacoco.csv
+  coverage: '/coverage=\d+\.\d+/'
+  only:
+    - master
+
+dockerize:
   stage: dockerize
   tags:
     - shell
-- 
GitLab