浏览代码

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 &
 
 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