diff --git a/.travis.yml b/.travis.yml index 2b458ff..5171704 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,16 +2,28 @@ language: python sudo: false -env: - - TOXENV=py26 - - TOXENV=py27 - - TOXENV=py32 - - TOXENV=py33 - - TOXENV=py34 - - TOXENV=py35 - - TOXENV=pypy - - TOXENV=pypy3 - - TOXENV=cover +matrix: + include: + - python: 2.6 + env: TOXENV=py26 + - python: 2.7 + env: TOXENV=py27 + - python: 3.2 + env: TOXENV=py32 + - python: 3.3 + env: TOXENV=py33 + - python: 3.4 + env: TOXENV=py34 + - python: 3.5 + env: TOXENV=py35 + - python: pypy + env: TOXENV=pypy + - python: pypy3 + env: TOXENV=pypy3 + - python: 3.5 + env: TOXENV=py2-cover,py3-cover,coverage + - python: 3.5 + env: TOXENV=docs install: - travis_retry pip install tox @@ -22,3 +34,6 @@ script: notifications: email: - pyramid-checkins@lists.repoze.org + irc: + channels: + - "chat.freenode.net#pyramid" diff --git a/tox.ini b/tox.ini index 69fd2cb..8508bb7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,25 +1,62 @@ [tox] envlist = - py26,py27,py32,py33,py34,py35,pypy,pypy3,cover,docs + py26,py27,py32,py33,py34,py35,pypy,pypy3, + docs, + {py2,py3}-cover,coverage [testenv] -commands = - python setup.py -q dev - python -Wd setup.py -q test -q - -[testenv:cover] +# Most of these are defaults but if you specify any you can't fall back +# to defaults for others. basepython = - python2.7 + py26: python2.6 + py27: python2.7 + py32: python3.2 + py33: python3.3 + py34: python3.4 + py35: python3.5 + pypy: pypy + pypy3: pypy3 + py2: python2.7 + py3: python3.5 + commands = - nosetests --with-xunit --with-xcoverage --cover-min-percentage=100 -deps = - nose - coverage - nosexcover + pip install colander[testing] + nosetests --with-xunit --xunit-file=nosetests-{envname}.xml {posargs:} [testenv:docs] -basepython = - python2.7 +basepython = python3.5 +whitelist_externals = make commands = pip install colander[docs] - sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html + make -C docs html epub BUILDDIR={envdir} "SPHINXOPTS=-W -E" + +# we separate coverage into its own testenv because a) "last run wins" wrt +# cobertura jenkins reporting and b) pypy and jython can't handle any +# combination of versions of coverage and nosexcover that i can find. +[testenv:py2-cover] +commands = + pip install colander[testing] + coverage run --source=colander {envbindir}/nosetests + coverage xml -o coverage-py2.xml +setenv = + COVERAGE_FILE=.coverage.py2 + +[testenv:py3-cover] +commands = + pip install colander[testing] + coverage run --source=colander {envbindir}/nosetests + coverage xml -o coverage-py3.xml +setenv = + COVERAGE_FILE=.coverage.py3 + +[testenv:coverage] +basepython = python3.5 +commands = + coverage erase + coverage combine + coverage xml + coverage report --show-missing --fail-under=100 +deps = + coverage +setenv = + COVERAGE_FILE=.coverage