From bb690bb2cdb7657c2513526486059492ba27b1d1 Mon Sep 17 00:00:00 2001
From: Daniel Hornung <d.hornung@indiscale.com>
Date: Mon, 5 Jul 2021 14:42:04 +0200
Subject: [PATCH] ENH: CI for mysql: Separate services for different testing
 jobs.

---
 .gitlab-ci.yml | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f9d499b..ead1dad 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -19,11 +19,6 @@
 # along with this program. If not, see <https://www.gnu.org/licenses/>.
 #
 
-services:
-  - mariadb:10.4
-  - name: mysql:8.0
-    command: ["--default-authentication-plugin=mysql_native_password"]
-
 variables:
   DEPLOY_REF: dev
   CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb/src/caosdb-mysqlbackend/testenv:latest
@@ -58,19 +53,26 @@ build-testenv:
 
 ######## Test ########
 
-# Run the unit tests with MySQL
-unittests-mysql:
+# Run the unit tests with MariaDB
+unittests-mariadb:
   tags: [ docker ]
   stage: test
+  services:
+    - mariadb:10.4
+
   script:
-    - make pipeline-test SQL_HOST=mysql
+    - make pipeline-test SQL_HOST=mariadb
 
-# Run the unit tests with MariaDB
-unittests-mariadb:
+# Run the unit tests with MySQL
+unittests-mysql:
   tags: [ docker ]
   stage: test
+  services:
+    - name: mysql:8.0
+      command: ["--default-authentication-plugin=mysql_native_password"]
+
   script:
-    - make pipeline-test SQL_HOST=mariadb
+    - make pipeline-test SQL_HOST=mysql
 
 ######## Deploy ########
 
-- 
GitLab