Skip to content

Commit

Permalink
Add coveralls and a coverage environment.
Browse files Browse the repository at this point in the history
Currently only at 67% coverage.
  • Loading branch information
jamadden committed Oct 25, 2018
1 parent b99ca37 commit 3ec3840
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 8 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
@@ -1,5 +1,4 @@
language: python
sudo: false
python:
- 2.7
- 3.4
Expand All @@ -11,10 +10,15 @@ matrix:
include:
- python: 3.7
dist: xenial
sudo: true

install:
- pip install -e .[test]
- pip install -U pip setuptools
- pip install -U coverage coveralls
- pip install -U -e .[test]
script:
- python setup.py -q test -q
- coverage run -m zope.testrunner --test-path=src
after_success:
- coveralls
notifications:
email: false
cache: pip
2 changes: 2 additions & 0 deletions MANIFEST.in
Expand Up @@ -3,6 +3,8 @@ include *.txt
include *.py
include buildout.cfg
include tox.ini
include .travis.yml
include .coveragerc

recursive-include src *

Expand Down
11 changes: 9 additions & 2 deletions setup.py
Expand Up @@ -27,6 +27,11 @@ def read(*rnames):
return f.read()


TESTS_REQUIRE = [
'zope.testing',
'zope.testrunner',
]

setup(
name="zope.keyreference",
version=read("version.txt").strip(),
Expand Down Expand Up @@ -67,7 +72,9 @@ def read(*rnames):
packages=find_packages("src"),
package_dir={"": "src"},
namespace_packages=["zope"],
extras_require={"test": ["zope.testing"]},
extras_require={
"test": TESTS_REQUIRE,
},
install_requires=[
"setuptools",
"ZODB",
Expand All @@ -76,7 +83,7 @@ def read(*rnames):
"zope.interface",
"zope.schema",
],
tests_require=["zope.testing"],
tests_require=TESTS_REQUIRE,
test_suite="zope.keyreference.tests.test_suite",
include_package_data=True,
zip_safe=False,
Expand Down
14 changes: 12 additions & 2 deletions tox.ini
Expand Up @@ -9,8 +9,18 @@ envlist =
pypy3

[testenv]
usedevelop = true
commands =
python setup.py -q test -q
zope-testrunner --test-path=src []
deps =
.[test]

[testenv:coverage]
usedevelop = true
basepython =
python3.6
commands =
coverage run -m zope.testrunner --test-path=src []
coverage report --fail-under=67
deps =
{[testenv]deps}
coverage

0 comments on commit 3ec3840

Please sign in to comment.