Преглед изворни кода

feat(test): run tests with coverage report

Nils Wisiol пре 6 година
родитељ
комит
62ec6254ee
2 измењених фајлова са 3 додато и 1 уклоњено
  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 &
 /root/cronhook/start-cron.sh &
 
 
 echo Starting API tests ...
 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
 uwsgi~=2.0.0
 django-nocaptcha-recaptcha==0.0.20  # updated manually
 django-nocaptcha-recaptcha==0.0.20  # updated manually
 djangorestframework-bulk~=0.2.0
 djangorestframework-bulk~=0.2.0
+coverage~=4.5.3