tox and travis improvements
This commit is contained in:
parent
a919485072
commit
cc10f5dc68
12
.coveragerc
Normal file
12
.coveragerc
Normal file
@ -0,0 +1,12 @@
|
||||
[run]
|
||||
source = autobahn
|
||||
branch = True
|
||||
|
||||
[report]
|
||||
precision = 2
|
||||
exclude_lines =
|
||||
def __repr__
|
||||
raise AssertionError
|
||||
pragma: no cover
|
||||
if self\._debug
|
||||
raise NotImplementedError
|
34
.travis.yml
34
.travis.yml
@ -1,26 +1,34 @@
|
||||
language: python
|
||||
sudo: false
|
||||
|
||||
install:
|
||||
- pip install tox
|
||||
- pip install tox codecov
|
||||
|
||||
env:
|
||||
- TOX_ENV=flake8
|
||||
- TOX_ENV=py26twisted
|
||||
- TOX_ENV=py26asyncio
|
||||
- TOX_ENV=py27twisted
|
||||
- TOX_ENV=py27asyncio
|
||||
- TOX_ENV=py33asyncio
|
||||
- TOX_ENV=py34asyncio
|
||||
- TOX_ENV=pypy2twisted
|
||||
- TOX_ENV=pypy2asyncio
|
||||
- TOX_ENV=pypy-twtrunk
|
||||
- TOX_ENV=pypy-trollius
|
||||
- TOX_ENV=py27-twtrunk
|
||||
- TOX_ENV=py27-trollius
|
||||
- TOX_ENV=py33-twtrunk
|
||||
- TOX_ENV=py33-trollius
|
||||
- TOX_ENV=py34-twtrunk
|
||||
- TOX_ENV=py34-asyncio
|
||||
- TOX_ENV=pypy-tw122
|
||||
- TOX_ENV=pypy-tw132
|
||||
- TOX_ENV=pypy-twcurrent
|
||||
- TOX_ENV=py26-tw122
|
||||
- TOX_ENV=py26-tw132
|
||||
- TOX_ENV=py26-twcurrent
|
||||
- TOX_ENV=py27-tw122
|
||||
- TOX_ENV=py27-tw132
|
||||
- TOX_ENV=py27-twcurrent
|
||||
|
||||
script:
|
||||
- tox -c tox.ini -e $TOX_ENV
|
||||
|
||||
# This reportedly works around an issue downloading packages from pypi on
|
||||
# travis. Consider removing this after the underlying issue is fixed.
|
||||
# https://github.com/travis-ci/travis-ci/issues/2389
|
||||
sudo: false
|
||||
after_script:
|
||||
- codecov
|
||||
|
||||
notifications:
|
||||
irc:
|
||||
|
145
tox.ini
145
tox.ini
@ -1,24 +1,38 @@
|
||||
[tox]
|
||||
envlist = flake8,
|
||||
py26twisted,
|
||||
py26asyncio,
|
||||
py27twisted,
|
||||
py27asyncio,
|
||||
py33asyncio,
|
||||
py34asyncio,
|
||||
pypy2twisted,
|
||||
pypy2asyncio
|
||||
envlist = flake8, {pypy,py27,py33}-{twtrunk,trollius}, {py34}-{twtrunk,asyncio}, {pypy,py26,py27}-{tw122,tw132,twcurrent},
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
pytest
|
||||
mock
|
||||
unittest2
|
||||
coverage
|
||||
commands = python -m pytest
|
||||
msgpack-python
|
||||
|
||||
; twisted dependencies
|
||||
twtrunk: https://github.com/twisted/twisted/archive/trunk.zip
|
||||
tw122: Twisted==12.2
|
||||
tw132: Twisted==13.2
|
||||
twcurrent: Twisted
|
||||
|
||||
; asyncio dependencies
|
||||
asyncio,trollius: pytest
|
||||
trollius: trollius>=0.1.2
|
||||
trollius: futures>=2.1.5
|
||||
commands =
|
||||
sh -c "which python"
|
||||
python -V
|
||||
coverage --version
|
||||
asyncio,trollius: coverage run {envbindir}/py.test autobahn
|
||||
twtrunk,twcurrent,tw122,tw132,twcurrent: coverage run {envbindir}/trial autobahn
|
||||
coverage report
|
||||
whitelist_externals = sh
|
||||
setenv =
|
||||
asyncio,trollius: USE_ASYNCIO = 1
|
||||
twtrunk,twcurrent,tw122,tw132,twcurrent: USE_TWISTED = 1
|
||||
|
||||
|
||||
[testenv:flake8]
|
||||
skip_install = True
|
||||
deps =
|
||||
flake8
|
||||
commands =
|
||||
@ -27,112 +41,3 @@ commands =
|
||||
flake8 --version
|
||||
flake8 -v --ignore=E501 autobahn
|
||||
basepython = python2.7
|
||||
|
||||
|
||||
[testenv:py26twisted]
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
twisted
|
||||
unittest2
|
||||
commands =
|
||||
sh -c "which python"
|
||||
sh -c "which trial"
|
||||
python -V
|
||||
trial --version
|
||||
trial autobahn
|
||||
basepython = python2.6
|
||||
install_command = pip install {packages} autobahn[twisted,serialization]
|
||||
setenv =
|
||||
USE_TWISTED = 1
|
||||
|
||||
|
||||
[testenv:py26asyncio]
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
unittest2
|
||||
commands =
|
||||
sh -c "which python"
|
||||
python -V
|
||||
python -m pytest
|
||||
basepython = python2.6
|
||||
install_command = pip install {packages} autobahn[asyncio,serialization]
|
||||
setenv =
|
||||
USE_ASYNCIO = 1
|
||||
|
||||
|
||||
[testenv:py27twisted]
|
||||
commands =
|
||||
sh -c "which python"
|
||||
sh -c "which trial"
|
||||
sh -c "which coverage"
|
||||
python -V
|
||||
coverage --version
|
||||
{envbindir}/trial --version
|
||||
# XXX should probably add --branch
|
||||
coverage run --source=autobahn --omit=*test* {envbindir}/trial autobahn
|
||||
coverage report --show-missing
|
||||
coverage html
|
||||
basepython = python2.7
|
||||
install_command = pip install {packages} autobahn[twisted,serialization]
|
||||
setenv =
|
||||
USE_TWISTED = 1
|
||||
|
||||
|
||||
[testenv:py27asyncio]
|
||||
commands =
|
||||
sh -c "which python"
|
||||
python -V
|
||||
python -m pytest
|
||||
basepython = python2.7
|
||||
install_command = pip install {packages} autobahn[asyncio,serialization]
|
||||
setenv =
|
||||
USE_ASYNCIO = 1
|
||||
|
||||
|
||||
[testenv:py33asyncio]
|
||||
commands =
|
||||
sh -c "which python"
|
||||
python -V
|
||||
python -m pytest
|
||||
basepython = python3.3
|
||||
install_command = pip install {packages} autobahn[asyncio,serialization]
|
||||
setenv =
|
||||
USE_ASYNCIO = 1
|
||||
|
||||
|
||||
[testenv:py34asyncio]
|
||||
commands =
|
||||
sh -c "which python"
|
||||
python -V
|
||||
python -m pytest
|
||||
basepython = python3.4
|
||||
install_command = pip install {packages} autobahn[asyncio,serialization]
|
||||
setenv =
|
||||
USE_ASYNCIO = 1
|
||||
|
||||
|
||||
[testenv:pypy2twisted]
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
twisted
|
||||
commands =
|
||||
sh -c "which python"
|
||||
sh -c "which trial"
|
||||
python -V
|
||||
trial --version
|
||||
trial autobahn
|
||||
basepython = pypy
|
||||
install_command = pip install {packages} autobahn[twisted,serialization]
|
||||
setenv =
|
||||
USE_TWISTED = 1
|
||||
|
||||
|
||||
[testenv:pypy2asyncio]
|
||||
commands =
|
||||
sh -c "which python"
|
||||
python -V
|
||||
python -m pytest
|
||||
basepython = pypy
|
||||
install_command = pip install {packages} autobahn[asyncio,serialization]
|
||||
setenv =
|
||||
USE_ASYNCIO = 1
|
||||
|
Loading…
Reference in New Issue
Block a user