Browse Source

Merge pull request #205 from CatalystCode/enhancement/coverage

Enhancement/Add code coverage
pull/219/head
Hiroki Nakayama 5 years ago
committed by GitHub
parent
commit
59e8f8a436
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 7 deletions
  1. 15
      .coveragerc
  2. 1
      .dockerignore
  3. 1
      requirements.txt
  4. 3
      tools/ci.sh
  5. 6
      tox.ini

15
.coveragerc

@ -0,0 +1,15 @@
[report]
omit =
app/app/wsgi.py
app/classifier/*
app/server/migrations/*
app/server/templatetags/*
app/server/tests/*
exclude_lines =
pragma: no cover
if __name__ == .__main__.
def __str__
raise NotImplementedError
fail_under = 90

1
.dockerignore

@ -8,5 +8,6 @@ app/server/webpack-stats.json
!data/
!tests/
!tools/
!.coveragerc
!.flake8
!requirements.txt

1
requirements.txt

@ -1,4 +1,5 @@
applicationinsights==0.11.7
coverage==4.5.3
dj-database-url==0.5.0
Django==2.1.7
django-filter==2.0.0

3
tools/ci.sh

@ -5,6 +5,7 @@ set -o errexit
flake8
python app/manage.py migrate
python app/manage.py collectstatic
python app/manage.py test server.tests
coverage run --source=app app/manage.py test server.tests
coverage report
(cd app/server && npm run lint)

6
tox.ini

@ -1,6 +0,0 @@
[tox]
envlist = py27,py34
[testenv]
deps=pytest
commands=py.test
Loading…
Cancel
Save