From 83969d6ff5deb81fe9ec1c3e46b76f603989e7ff Mon Sep 17 00:00:00 2001
From: Bjarke Madsen <bjarke@nordu.net>
Date: Fri, 28 Jul 2023 10:39:58 +0200
Subject: [PATCH] run tests concurrently

---
 test/__init__.py |  0
 tox.ini          | 11 ++++++-----
 2 files changed, 6 insertions(+), 5 deletions(-)
 create mode 100644 test/__init__.py

diff --git a/test/__init__.py b/test/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/tox.ini b/tox.ini
index 4d1400a4..2048200c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -8,18 +8,19 @@ max-line-length = 120
 [mypy]
 exclude = .tox
 
+[coverage:run]
+concurrency = multiprocessing,thread
+
 [testenv]
 deps =
-    coverage
+    pytest-xdist
+    pytest-cov
     flake8
     -r requirements.txt
 
 commands =
     coverage erase
-    coverage run --source compendium_v2 -m pytest {posargs}
-    coverage xml
-    coverage html
-    coverage report --fail-under 80
+    pytest -n auto --cov compendium_v2 --cov-fail-under=80 --cov-report html --cov-report xml --cov-report term -p no:checkdocs
     flake8
     mypy {toxinidir}/compendium_v2/ {toxinidir}/test/
     sphinx-build -M html docs/source docs/build -E
-- 
GitLab