diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..8499040 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,14 @@ +[run] +command_line = manage.py test + +branch = true + +source = + main/ + + +omit = + main/migrations/* + main/apps.py + main/tests.py + diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..ef3bf26 --- /dev/null +++ b/.gitlab-ci.yml @@ -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 diff --git a/requirements/dev.txt b/requirements/dev.txt index be32176..64a12ad 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -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