Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] Adding codecov #2

Merged
merged 12 commits into from
Sep 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ Documentation/
celery/tests/cover/
.ve*
cover/
coverage.*
htmlcov/
.vagrant/
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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