diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 54affc31ad805a9f1125e435cf80ee2c869af2d5..0430a4f6b5ac08d4ab38f00bff78b845e11fb97e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -59,13 +59,6 @@ unittest_py3.7:
   stage: test
   needs: [ ]
   image: python:3.7
-  script: *python_test_script
-
-unittest_py3.8:
-  tags: [ docker ]
-  stage: test
-  needs: [ ]
-  image: python:3.8
   script: &python_test_script
     # Python docker has problems with tox and pip so use plain pytest here
     - touch ~/.pycaosdb.ini
@@ -73,6 +66,13 @@ unittest_py3.8:
     - pip install .
     - python -m pytest unittests
 
+unittest_py3.8:
+  tags: [ docker ]
+  stage: test
+  needs: [ ]
+  image: python:3.8
+  script: *python_test_script
+
 # This needs to be changed once Python 3.9 isn't the standard Python in Debian
 # anymore.
 unittest_py3.9: