Add coverage reports
This commit is contained in:
parent
c26397ae8d
commit
9f2b2a81c9
5 changed files with 21 additions and 1 deletions
|
@ -68,7 +68,15 @@ test_python:
|
|||
DATABASE_URL: postgres://postgres@postgres/postgres
|
||||
script:
|
||||
- ./manage.py collectstatic --noinput --clear
|
||||
- ./manage.py test
|
||||
- coverage run ./manage.py test
|
||||
- coverage report
|
||||
- coverage xml
|
||||
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
|
||||
artifacts:
|
||||
reports:
|
||||
coverage_report:
|
||||
coverage_format: cobertura
|
||||
path: coverage.xml
|
||||
<<: *python_test_template
|
||||
dependencies:
|
||||
- pip
|
||||
|
|
5
justfile
5
justfile
|
@ -26,6 +26,11 @@ build:
|
|||
test *ARGS:
|
||||
./manage.py test {{ ARGS }}
|
||||
|
||||
coverage:
|
||||
coverage run ./manage.py test --keepdb
|
||||
coverage report
|
||||
coverage html
|
||||
|
||||
format:
|
||||
black .
|
||||
isort .
|
||||
|
|
|
@ -13,3 +13,4 @@ mypy
|
|||
curlylint
|
||||
djhtml
|
||||
wagtail-factories
|
||||
coverage
|
||||
|
|
|
@ -15,6 +15,7 @@ build==0.8.0 # via pip-tools
|
|||
certifi==2022.6.15 # via -r requirements/base.txt, requests
|
||||
charset-normalizer==2.1.0 # via -r requirements/base.txt, requests
|
||||
click==8.1.3 # via -r requirements/base.txt, black, curlylint, pip-tools, rq
|
||||
coverage==6.4.4 # via -r requirements/dev.in
|
||||
curlylint==0.13.1 # via -r requirements/dev.in
|
||||
deprecated==1.2.13 # via -r requirements/base.txt, redis
|
||||
django==4.0.6 # via -r requirements/base.txt, django-browser-reload, django-debug-toolbar, django-filter, django-htmx, django-modelcluster, django-permissionedforms, django-redis, django-rq, django-taggit, django-treebeard, djangorestframework, wagtail
|
||||
|
|
|
@ -24,3 +24,8 @@ skip_glob=env/*
|
|||
[flake8]
|
||||
extend_ignore=E128,E501
|
||||
extend_exclude=env
|
||||
|
||||
[coverage:report]
|
||||
exclude_lines =
|
||||
pragma: no cover
|
||||
if settings.DEBUG
|
||||
|
|
Loading…
Reference in a new issue