Explorar o código

feat(test): run tests with coverage report

Nils Wisiol %!s(int64=6) %!d(string=hai) anos
pai
achega
62ec6254ee
Modificáronse 2 ficheiros con 3 adicións e 1 borrados
  1. 2 1
      api/entrypoint-tests.sh
  2. 1 0
      api/requirements.txt

+ 2 - 1
api/entrypoint-tests.sh

@@ -8,4 +8,5 @@ echo "waiting for dependencies ..."
 /root/cronhook/start-cron.sh &
 
 echo Starting API tests ...
-python3 manage.py test -v 3 --noinput
+coverage run --source='.' manage.py test -v 3 --noinput
+coverage report

+ 1 - 0
api/requirements.txt

@@ -8,3 +8,4 @@ requests~=2.21.0
 uwsgi~=2.0.0
 django-nocaptcha-recaptcha==0.0.20  # updated manually
 djangorestframework-bulk~=0.2.0
+coverage~=4.5.3