From b4302f33145fc9de6476e8c26bcbae4585ca7f65 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 17 May 2017 23:28:51 +0100 Subject: [PATCH] Add coverage tracking --- .coveragerc | 12 ++++++++++++ .travis.yml | 5 ++++- tox.ini | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..f46d8db --- /dev/null +++ b/.coveragerc @@ -0,0 +1,12 @@ +[run] +branch = true + +[report] +omit = + *site-packages* + *tests* + *.tox* + *conftest* +show_missing = True +exclude_lines = + raise NotImplementedError diff --git a/.travis.yml b/.travis.yml index b050065..61408f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,11 +12,14 @@ env: - TOXENV=pypy # command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors -install: pip install -U tox +install: pip install -U tox codecov # command to run tests, e.g. python setup.py test script: tox -e ${TOXENV} +after_success: + - codecov -e TOXENV + # After you create the Github repo and add it to Travis, run the # travis_pypi_setup.py script to finish PyPI deployment setup deploy: diff --git a/tox.ini b/tox.ini index f90ca6a..bd05163 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ commands=flake8 webhook_logger setenv = PYTHONPATH = {toxinidir}:{toxinidir}/webhook_logger -commands = python setup.py test +commands = coverage run --source webhook_logger setup.py test ; If you want to make tox run the tests with the same versions, create a ; requirements.txt with the pinned versions and uncomment the following lines: