diff --git a/.travis.yml b/.travis.yml index 6436a6e15..a7cd99b97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,25 +1,34 @@ language: python -python: -- 2.6 -- 2.7 -- 3.2 -- 3.3 -- 3.4 -- pypy -# command to run tests, e.g. python setup.py test before_script: -- pip install -r dev-requirements.txt +- pip install tox - pip install -U requests"$REQUESTS_VERSION" # test script -script: make travis +script: tox -e ${TOX_ENV} notifications: - on_success: change - on_failure: always + on_success: change + on_failure: always env: global: - TRAVIS_GH3="True" matrix: - - REQUESTS_VERSION="==2.0.1" - - REQUESTS_VERSION="" # Latest + - TOX_ENV=py26 REQUESTS_VERSION="==2.0.1" + - TOX_ENV=py27 REQUESTS_VERSION="==2.0.1" + - TOX_ENV=py32 REQUESTS_VERSION="==2.0.1" + - TOX_ENV=py33 REQUESTS_VERSION="==2.0.1" + - TOX_ENV=py34 REQUESTS_VERSION="==2.0.1" + - TOX_ENV=pypy REQUESTS_VERSION="==2.0.1" + - TOX_ENV=py26 REQUESTS_VERSION="" + - TOX_ENV=py27 REQUESTS_VERSION="" + - TOX_ENV=py32 REQUESTS_VERSION="" + - TOX_ENV=py33 REQUESTS_VERSION="" + - TOX_ENV=py34 REQUESTS_VERSION="" + - TOX_ENV=pypy REQUESTS_VERSION="" + - TOX_ENV=py27-flake8 + - TOX_ENV=py34-flake8 + +matrix: + allow_failures: + - env: TOX_ENV=py27-flake8 + - env: TOX_ENV=py34-flake8 diff --git a/tox.ini b/tox.ini index c9a3fc1b2..aff03dba3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,20 +1,42 @@ [tox] -envlist = py26,py27,py32,py33,py34 +envlist = py26,py27,py32,py33,py34,pypy,{py27,py34}-flake8 + [testenv] -deps = - requests>=1.2.3 - coverage>=3.5.2 - mock>=1.0.1 -commands = - python setup.py test +pip_pre = False +deps = -rdev-requirements.txt +commands = py.test + +[testenv:pypy] +deps = + -rdev-requirements.txt + unittest2 +commands = py.test [testenv:py26] -deps = - requests>=1.2.3 - coverage>=3.5.2 - mock>=1.0.1 -commands = - python setup.py test +deps = + -rdev-requirements.txt + unittest2 +commands = py.test + +[testenv:py27] +deps = + -rdev-requirements.txt + unittest2 +commands = py.test + +[testenv:py27-flake8] +basepython = python2.7 +deps = + flake8 + flake8-docstrings +commands = flake8 github3/ + +[testenv:py34-flake8] +basepython = python3.4 +deps = + flake8 + flake8-docstrings +commands = flake8 github3/ [pytest] addopts = -q tests/