diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 02902af89c36903de8299f20d10c8b8672a156f0..9274de9635054faa39e240c2c535a2729d94e05b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -65,7 +65,9 @@ test:
   script:
     - pip install coveralls
     - pip install -r requirements.txt
-    - coverage run --source=duniterpy setup.py test
+    - coverage run -m unittest
+    - coverage report -m
+  coverage: '/TOTAL.+ ([0-9]{1,3}%)/'
 
 check:
   <<: *pyenv
diff --git a/Makefile b/Makefile
index 5de03c5a811725987272556a906d655672895218..0dbd793d5925f3c13892cda7768860d0b93916d5 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ docs:
 
 # run tests
 tests:
-	python3 -m unittest ${TESTS_FILTER}
+	python3 -m   ${TESTS_FILTER}
 
 # check
 check: mypy pylint check-format