diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b9f07425b0835d0a6a31740f30a000a9aacc1339..f6cac6e60bc57e4838990dedf3cc25005ecee3c2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -32,8 +32,8 @@ test:
     - pip install pipenv
     - pipenv install --dev --python=$version
   script:
-    - pipenv run bats
-    - pipenv run doctest
+    - pipenv run bats | tee results.tap
+    - pipenv run doctest --junit-xml results/doctest.xml
   after_script:
     - juxr tap --name bats --output results/ -- cat results.tap
   variables:
diff --git a/Pipfile b/Pipfile
index b5e9a902bcb418906d40dd9f4c429ca9625e8e7a..df5ea8a542521732dab81fa38683f8bfd8d95570 100644
--- a/Pipfile
+++ b/Pipfile
@@ -17,4 +17,4 @@ clean = "git clean -fdX"
 upload = "twine upload"
 bats = "bats -t tests/"
 check = "sh -c 'rm -rf dist/ && python setup.py bdist_wheel && twine check dist/*'"
-doctest = "pytest --doctest-modules --junit-xml results/doctest.xml"
+doctest = "pytest --doctest-modules"