Skip to content

Commit

Permalink
Add tox config and coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Mar 23, 2018
1 parent e4c73eb commit ec07757
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .coveragerc
@@ -0,0 +1,6 @@
[run]
branch = True
source = src

[report]
precision = 2
5 changes: 5 additions & 0 deletions .gitignore
@@ -1,8 +1,13 @@
*.pyc
.coverage
.coverage.*
.installed.cfg
.tox/
bin/
coverage.xml
develop-eggs/
dist/
htmlcov/
include/
lib/
local/
Expand Down
5 changes: 4 additions & 1 deletion .travis.yml
Expand Up @@ -5,10 +5,13 @@ python:
install:
- pip install -U setuptools
- pip install zc.buildout
- pip install coveralls coverage
- buildout bootstrap
- buildout
script:
- bin/test -v1
- coverage run bin/test --all -v
after_success:
- coveralls
notifications:
email: false
cache:
Expand Down
30 changes: 30 additions & 0 deletions tox.ini
@@ -0,0 +1,30 @@
[tox]
envlist =
py27,
coverage-report,

[testenv]
skip_install = true
commands =
{envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} bootstrap
{envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test
coverage run {envbindir}/test --all {posargs:-vc}
deps =
setuptools >= 39
zc.buildout
coverage
setenv =
COVERAGE_FILE=.coverage.{envname}

[testenv:coverage-report]
basepython = python2.7
deps = coverage
setenv =
COVERAGE_FILE=.coverage
skip_install = true
commands =
coverage erase
coverage combine
coverage html -i
coverage xml -i
coverage report -i --fail-under=79

0 comments on commit ec07757

Please sign in to comment.