From 0df1afb07a095ec281f0eaaee7ff6da509638a17 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Henning?= <soeren.henning@email.uni-kiel.de>
Date: Tue, 18 May 2021 09:01:19 +0200
Subject: [PATCH] Test SLO checker in CI pipeline

---
 .gitlab-ci.yml                   | 14 +++++++++++++-
 slope-evaluator/requirements.txt |  1 +
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 01630912c..f2f1bd626 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -307,11 +307,23 @@ deploy-theodolite:
 
 # Theodolite SLO Checker: Lag Trend
 
+test-slo-checker-lag-trend:
+  stage: test
+  image: python:3.7-slim
+  tags:
+    - exec-docker
+  script:
+    - cd slope-evaluator
+    - pip install -r requirements.txt
+    - cd app
+    - python -m unittest
+
 deploy-slo-checker-lag-trend:
   stage: deploy
   extends:
     - .dind
-  needs: []
+  needs:
+    - test-slo-checker-lag-trend
   script:
     - DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//')
     - docker build --pull -t theodolite-slo-checker-lag-trend slope-evaluator
diff --git a/slope-evaluator/requirements.txt b/slope-evaluator/requirements.txt
index 6934f4b78..670815f35 100644
--- a/slope-evaluator/requirements.txt
+++ b/slope-evaluator/requirements.txt
@@ -2,3 +2,4 @@ fastapi==0.55.1
 scikit-learn==0.20.3
 pandas==1.0.3
 uvicorn
+requests
-- 
GitLab