Rewrite travis.yml to make it simpler and more comprehensive.
Unlike tox, travis never reuses virtualenvs so setup/install time dominates. Each test configuration only takes a few seconds once everything is installed, so it's better to run fewer environments with lots of tests in each. This reduces the configuration to 10 environments (two for each python version, with and without dependencies installed). All tests are run in every environment where they can run (unlike the tox config, which has many variants that only run under py27)
This commit is contained in:
parent
8a198cc403
commit
20afb40419
70
.travis.yml
70
.travis.yml
|
@ -6,62 +6,32 @@ python:
|
|||
- pypy
|
||||
- 3.2
|
||||
- 3.3
|
||||
matrix:
|
||||
include:
|
||||
- python: 2.6
|
||||
env: MINIMAL="true"
|
||||
- python: 2.7
|
||||
env: MINIMAL="true"
|
||||
- python: pypy
|
||||
env: MINIMAL="true"
|
||||
- python: 3.2
|
||||
env: MINIMAL="true"
|
||||
- python: 3.3
|
||||
env: MINIMAL="true"
|
||||
- python: 2.7
|
||||
env: FLAGS="--httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient"
|
||||
- python: 2.7
|
||||
env: FLAGS="--ioloop=tornado.platform.select.SelectIOLoop"
|
||||
- python: 2.7
|
||||
env: FLAGS="--ioloop=tornado.platform.twisted.TwistedIOLoop"
|
||||
- python: 2.7
|
||||
env: FLAGS="--resolver=tornado.netutil.ThreadedResolver"
|
||||
- python: 2.7
|
||||
env: FLAGS="--resolver=tornado.platform.twisted.TwistedResolver"
|
||||
- python: 2.7
|
||||
env: DEPS="pycares" FLAGS="--resolver=tornado.platform.caresresolver.CaresResolver"
|
||||
- python: 3.2
|
||||
env: DEPS="pycares" FLAGS="--resolver=tornado.platform.caresresolver.CaresResolver"
|
||||
- python: 2.7
|
||||
env: DEPS="http://pypi.python.org/packages/source/M/Monotime/Monotime-1.0.tar.gz" FLAGS="--ioloop_time_monotonic"
|
||||
- python: 3.3
|
||||
env: FLAGS="--ioloop_time_monotonic"
|
||||
- python: 2.7
|
||||
env: PYFLAGS="-O"
|
||||
- python: 3.2
|
||||
env: PYFLAGS="-O"
|
||||
- python: 3.2
|
||||
env: LANG="en_US.utf-8"
|
||||
- python: 3.2
|
||||
env: LANG="C"
|
||||
- python: 3.2
|
||||
env: PYFLAGS="-bb"
|
||||
- python: 3.3
|
||||
env: PYFLAGS="-bb"
|
||||
env:
|
||||
- DEPS=true
|
||||
- DEPS=false
|
||||
install:
|
||||
# librtmp-dev is required to build libcurl
|
||||
- sudo apt-get install librtmp-dev
|
||||
# always install unittest2 on py26 even if $DEPS is unset
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install --use-mirrors unittest2; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' && -z "$MINIMAL" ]]; then pip install --use-mirrors futures mock pycurl twisted; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' && -z "$MINIMAL" ]]; then pip install --use-mirrors futures mock pycurl twisted; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == 'pypy' && -z "$MINIMAL" ]]; then pip install --use-mirrors futures mock; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == '3.2' && -z "$MINIMAL" ]]; then pip install --use-mirrors mock; fi
|
||||
- if [[ "$DEPS" ]]; then pip install --use-mirrors $DEPS; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == 2* && $DEPS == true ]]; then pip install --use-mirrors futures mock pycares pycurl twisted http://pypi.python.org/packages/source/M/Monotime/Monotime-1.0.tar.gz; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == 'pypy' && $DEPS == true ]]; then pip install --use-mirrors futures mock; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == '3.2' && $DEPS == true ]]; then pip install --use-mirrors pycares mock; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == '3.3' && $DEPS == true ]]; then pip install --use-mirrors pycares; fi
|
||||
- python setup.py install
|
||||
script:
|
||||
# Must cd somewhere else so python3 doesn't get confused and run
|
||||
# the python2 code from the current directory instead of the installed
|
||||
# 2to3 version.
|
||||
- cd maint
|
||||
- python $PYFLAGS -m tornado.test.runtests $FLAGS
|
||||
- python -m tornado.test.runtests
|
||||
- python -m tornado.test.runtests --ioloop=tornado.platform.select.SelectIOLoop
|
||||
- python -m tornado.test.runtests --resolver=tornado.netutil.ThreadedResolver
|
||||
- python -O -m tornado.test.runtests
|
||||
- LANG=C python -m tornado.test.runtests
|
||||
- LANG=en_US.utf-8 python -m tornado.test.runtests
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then python -bb -m tornado.test.runtests; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == 2* && $DEPS == true ]]; then python -m tornado.test.runtests --httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == 2* && $DEPS == true ]]; then python -m tornado.test.runtests --ioloop_time_monotonic; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == 2* && $DEPS == true ]]; then python -m tornado.test.runtests --ioloop=tornado.platform.twisted.TwistedIOLoop; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == 2* && $DEPS == true ]]; then python -m tornado.test.runtests --resolver=tornado.platform.twisted.TwistedResolver; fi
|
||||
- if [[ $DEPS == true ]]; then python -m tornado.test.runtests --resolver = tornado.platform.caresresolver.CaresResolver; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]] then python -m tornado.test.runtests --ioloop_time_monotonic; fi
|
||||
|
|
Loading…
Reference in New Issue