diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 91abc39346e46feb184c1d29094361c0f635b1e3..189c7cb602bb64dc57d3609d4253138644265410 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -34,7 +34,7 @@ before_script:
   - pip install virtualenv
   - virtualenv venv
   - source venv/bin/activate
-  - pip install --upgrade pytest pytest-cov pyqt5 pytest-qt
+  - pip install --upgrade pytest pytest-cov pyqt5 pytest-qt pytest-xvfb
   - python -m pip install .
 
 .run-test:
@@ -60,7 +60,7 @@ run-doc-test:
   image: python:3.10
   stage: test
   script:
-    - pip install --upgrade numpydoc sphinx furo
+    - pip install --upgrade numpydoc sphinx furo pyqt5
     - sphinx-build -b html docs public
 
 pages: