diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..e054bc1 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,2 @@ +[run] +source = django_u2f diff --git a/.gitignore b/.gitignore index f892e5b..31f83de 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,7 @@ db.sqlite3 testproj/localhost.* # Unit test / coverage reports +htmlcov/ .tox/ +.coverage +.coverage.* diff --git a/.travis.yml b/.travis.yml index 6bff10f..76f5102 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,10 @@ install: - pip install --upgrade pip wheel - pip install -q $DJANGO_PACKAGE - pip install -e . - - pip install -r ./testproj/requirements.txt + - pip install -r dev-requirements.txt - pip freeze -script: ./testproj/manage.py test testproj +script: + - coverage run testproj/manage.py test testproj + - coverage report +after_success: + - coveralls diff --git a/README.rst b/README.rst index aecfac1..ea2d25a 100644 --- a/README.rst +++ b/README.rst @@ -5,6 +5,10 @@ Django U2F :alt: Build Status :target: https://travis-ci.org/gavinwahl/django-u2f +.. image:: https://coveralls.io/repos/gavinwahl/django-u2f/badge.svg?branch=master + :alt: Test Coverage + :target: https://coveralls.io/r/gavinwahl/django-u2f?branch=master + django-u2f provides support for FIDO U2F security tokens in Django. The functionality is similar to the `Security Key two-factor authentication that Google recently announced diff --git a/dev-requirements.txt b/dev-requirements.txt new file mode 100644 index 0000000..9f0e9bd --- /dev/null +++ b/dev-requirements.txt @@ -0,0 +1,3 @@ +coverage +coveralls +-r testproj/requirements.txt diff --git a/tox.ini b/tox.ini index 609cdce..b98c19c 100644 --- a/tox.ini +++ b/tox.ini @@ -6,10 +6,13 @@ envlist = py27-django18, [testenv] +usedevelop = True deps = django16: Django>=1.6,<1.7 django17: Django>=1.7,<1.8 django18: Django>=1.8,<1.9 - -rtestproj/requirements.txt + -rdev-requirements.txt commands = - python testproj/manage.py test testproj + coverage run testproj/manage.py test testproj + coverage report + coverage html