Skip to content

Commit

Permalink
[tests] Adding codecov (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek776 committed Sep 13, 2016
1 parent aba7735 commit 9e67e37
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 12 deletions.
12 changes: 6 additions & 6 deletions .coveragerc
@@ -1,17 +1,17 @@
[run]
branch = 1
cover_pylib = 0
include = *drf_mfa/*
omit = drf_mfa.tests.*
include = *deux/*
omit = deux.tests.*

[report]
omit =
*/python?.?/*
*/site-packages/*
*/pypy/*
drf_mfa/app_settings.py
drf_mfa/exceptions.py
drf_mfa/tests/*
drf_mfa/migrations/*
deux/app_settings.py
deux/exceptions.py
deux/tests/*
deux/migrations/*
manage.py
test_proj/*
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -27,4 +27,6 @@ Documentation/
celery/tests/cover/
.ve*
cover/
coverage.*
htmlcov/
.vagrant/
5 changes: 3 additions & 2 deletions .travis.yml
Expand Up @@ -18,6 +18,7 @@ env:
- TOXENV=flake8
- TOXENV=flakeplus
- TOXENV=apicheck
- TOXENV=cov
before_install:
- |
if [ "$TOXENV" = "pypy" ]; then
Expand All @@ -34,5 +35,5 @@ before_install:
install: travis_retry pip install -U tox
script: tox -v -- -v
after_success:
- .tox/$TRAVIS_PYTHON_VERSION/bin/coverage xml
- .tox/$TRAVIS_PYTHON_VERSION/bin/codecov -e TOXENV
- .tox/$TOXENV/bin/coverage xml
- .tox/$TOXENV/bin/codecov -e TOXENV
6 changes: 5 additions & 1 deletion README.rst
Expand Up @@ -3,7 +3,7 @@
:width: 721
:height: 250

|build-status| |license| |wheel| |pyversion| |pyimp|
|build-status| |codecov| |license| |wheel| |pyversion| |pyimp|

:Version: 1.0.0
:Web: https://deux.readthedocs.org/
Expand Down Expand Up @@ -102,3 +102,7 @@ You can install it by doing the following:
:alt: Support Python implementations.
:target: https://pypi.python.org/pypi/deux/

.. |codecov| image:: https://codecov.io/gh/robinhood/deux/branch/master/graph/badge.svg
:alt: Code Coverage
:target: https://codecov.io/gh/robinhood/deux

6 changes: 5 additions & 1 deletion docs/templates/readme.txt
Expand Up @@ -3,7 +3,7 @@
:width: 721
:height: 250

|build-status| |license| |wheel| |pyversion| |pyimp|
|build-status| |codecov| |license| |wheel| |pyversion| |pyimp|

.. include:: ../includes/introduction.txt

Expand All @@ -28,3 +28,7 @@
.. |pyimp| image:: https://img.shields.io/pypi/implementation/deux.svg
:alt: Support Python implementations.
:target: https://pypi.python.org/pypi/deux/

.. |codecov| image:: https://codecov.io/gh/robinhood/deux/branch/master/graph/badge.svg
:alt: Code Coverage
:target: https://codecov.io/gh/robinhood/deux
1 change: 1 addition & 0 deletions requirements/test.txt
@@ -1,4 +1,5 @@
mock==2.0.0
coverage>=3.0
pytest-cov>=2.3.1,<3.0.0
pytest-django>=3.0.0,<4.0.0
pytest-runner>=2.9,<3.0
1 change: 1 addition & 0 deletions setup.cfg
Expand Up @@ -4,6 +4,7 @@ test=pytest
[tool:pytest]
DJANGO_SETTINGS_MODULE = test_proj.settings
testpaths = deux
addopts = --cov=deux --cov-report term --cov-report html:cover --color yes --no-cov-on-fail

[wheel]
universal = 1
Expand Down
9 changes: 7 additions & 2 deletions tox.ini
Expand Up @@ -13,6 +13,7 @@ envlist =
flakeplus
apicheck
configcheck
cov

[testenv]
deps=
Expand All @@ -27,10 +28,10 @@ deps=
flake8,flakeplus: -r{toxinidir}/requirements/pkgutils.txt
sitepackages = False
recreate = False
commands = coverage run setup.py test
commands = pytest --cov-report=xml

basepython =
2.7,flake8,flakeplus,apicheck,linkcheck,configcheck: python2.7
2.7,flake8,flakeplus,apicheck,linkcheck,configcheck,cov: python2.7
3.4: python3.4
3.5: python3.5
pypy: pypy
Expand All @@ -54,3 +55,7 @@ commands =
[testenv:flakeplus]
commands =
flakeplus --2.7 {toxinidir}/deux

[testenv:cov]
commands =
pytest -xv --cov-report=xml

0 comments on commit 9e67e37

Please sign in to comment.