Add coverage, set up CI.

This commit is contained in:
Iurii Tatishchev 2021-05-19 23:27:46 -07:00
parent c95c0fe00b
commit de0da89f0a
Signed by: CaZzzer
GPG Key ID: 926BE949E29DCD03
3 changed files with 40 additions and 0 deletions

14
.coveragerc Normal file
View File

@ -0,0 +1,14 @@
[run]
command_line = manage.py test
branch = true
source =
main/
omit =
main/migrations/*
main/apps.py
main/tests.py

23
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,23 @@
image: python:3-alpine
stages:
- test
django_test:
stage: test
before_script:
- pip install -r requirements/dev.txt
script:
- python manage.py test
coverage:
stage: test
before_script:
- pip install -r requirements/dev.txt
script:
- coverage run
- coverage report -m
- coverage html -d public/coverage
artifacts:
paths:
- public/coverage

View File

@ -7,3 +7,6 @@ sphinx-rtd-theme==0.5.2
sphinx-autodoc-typehints==1.12.0
pyenchant==3.2.0
sphinxcontrib-spelling==7.2.1
# Tests
coverage==5.5