Skip to content

Commit

Permalink
Add tox.ini and configure TravisCI + Coveralls.
Browse files Browse the repository at this point in the history
The versions are pinned for Zope 2.13, to get a baseline of working tests.

(I could not yet figure out why the tests fail.)
  • Loading branch information
Michael Howitz committed Feb 28, 2018
1 parent 1bf0486 commit 6e5e6b8
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[run]
branch = True
source = Products.CMFUid

[report]
precision = 2
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@
*.mo
*.pyc
*.pyo
.coverage
.coverage.*
.eggs
.installed.cfg
.mr.developer.cfg
.tox/
bin
build
coverage.xml
develop-eggs
dist
downloads
eggs
htmlcov/
local.cfg
parts
var
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: python
sudo: false
python:
- 2.7
install:
- pip install zope.testrunner
- pip install coveralls coverage
- pip install -U -e .
script:
- coverage run -m zope.testrunner --path=src --all -v
after_success:
- coveralls
notifications:
email: false
cache:
pip: true
directories:
- eggs/
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,16 @@ def _package_doc(name):
setup_requires=['eggtestinfo',
],
install_requires=[
'setuptools',
'Zope2 >= 2.13.12',
'Products.BTreeFolder2 < 4',
'Products.CMFCore',
'Products.GenericSetup',
'Products.ZCTextIndex < 4',
'Products.ZCatalog < 4',
'Products.ZSQLMethods < 3',
'Zope2 >= 2.13.12, < 4.0.dev0',
'Products.GenericSetup < 1.10',
'Products.MailHost < 4',
'setuptools',
],
tests_require=[
'zope.testing >= 3.7.0',
Expand Down
28 changes: 28 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[tox]
envlist =
py27,
coverage-report,

[testenv]
usedevelop = True
commands =
coverage run {envbindir}/zope-testrunner --path=Products --all {posargs:-vc}
deps =
.
zope.testrunner
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

0 comments on commit 6e5e6b8

Please sign in to comment.