From 2537f1b0890d37e489d7637af132dbb89ec0cb89 Mon Sep 17 00:00:00 2001
From: Daniel <d.hornung@indiscale.com>
Date: Thu, 3 Mar 2022 16:01:52 +0100
Subject: [PATCH] ENH: Makefile target for testing.

---
 .gitlab-ci.yml | 8 +++++---
 Makefile       | 4 ++++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9bb5adb6..37a311d1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -51,13 +51,14 @@ pylint:
     - make lint
   allow_failure: true
 
-# run tests
-test:
+# run unit tests
+unittest:
   tags: [ docker ]
   stage: test
+  needs: [ build-testenv ]
   script:
     - touch ~/.pycaosdb.ini
-    - tox -r 
+    - make unittest
 
 # Trigger building of server image and integration tests
 trigger_build:
@@ -96,6 +97,7 @@ build-testenv:
 pages_prepare: &pages_prepare
   tags: [ cached-dind ]
   stage: deploy
+  needs: [ unittest ]
   only:
     refs:
       - /^release-.*$/i
diff --git a/Makefile b/Makefile
index 19233785..0a0888ad 100644
--- a/Makefile
+++ b/Makefile
@@ -42,3 +42,7 @@ style:
 lint:
 	pylint --unsafe-load-any-extension=y -d all -e E,F src/caosdb/common
 .PHONY: lint
+
+unittest:
+	tox -r
+.PHONY: unittest
-- 
GitLab