tornado/.travis.yml

84 lines
4.3 KiB
YAML
Raw Normal View History

2015-07-05 00:00:29 +00:00
# https://travis-ci.org/tornadoweb/tornado
dist: trusty
# Use containers instead of full VMs for faster startup.
sudo: false
matrix:
fast_finish: true
2012-02-27 18:09:46 +00:00
language: python
# For a list of available versions, run
# aws s3 ls s3://travis-python-archives/binaries/ubuntu/14.04/x86_64/
2012-02-27 18:09:46 +00:00
python:
- 2.7
- pypy2.7-5.8.0
2014-05-12 08:00:35 +00:00
- 3.4
2015-10-03 15:22:19 +00:00
- 3.5
2017-01-08 16:19:30 +00:00
- 3.6
2015-08-03 01:23:55 +00:00
- nightly
- pypy3.5-5.8.0
2012-02-27 18:09:46 +00:00
install:
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then travis_retry pip install mock monotonic; fi
- if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then travis_retry pip install mock; fi
# TODO(bdarnell): pycares tests are currently disabled on travis due to ipv6 issues.
#- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then travis_retry pip install pycares; fi
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then travis_retry pip install pycurl; fi
# Twisted runs on 2.x and 3.3+, but is flaky on pypy.
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then travis_retry pip install Twisted; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' || $TRAVIS_PYTHON_VERSION == '3.6' ]]; then travis_retry pip install sphinx sphinx_rtd_theme; fi
# On travis the extension should always be built
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then export TORNADO_EXTENSION=1; fi
- travis_retry python setup.py install
2017-04-13 02:21:32 +00:00
- travis_retry pip install codecov virtualenv
# Create a separate no-dependencies virtualenv to make sure all imports
# of optional-dependencies are guarded.
- virtualenv ./nodeps
- ./nodeps/bin/python -VV
- ./nodeps/bin/python setup.py install
- curl-config --version; pip freeze
2012-02-27 18:15:48 +00:00
script:
2016-07-26 03:45:45 +00:00
# Run the tests once from the source directory to detect issues
# involving relative __file__ paths; see
# https://github.com/tornadoweb/tornado/issues/1780
- unset TORNADO_EXTENSION && python -m tornado.test
# For all other test variants, get out of the source directory before
# running tests to ensure that we get the installed speedups module
# instead of the source directory which doesn't have it.
- cd maint
# Copy the coveragerc down so coverage.py can find it.
- cp ../.coveragerc .
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then export TORNADO_EXTENSION=1; fi
- export TARGET="-m tornado.test.runtests"
2014-06-21 17:34:03 +00:00
# Travis workers are often overloaded and cause our tests to exceed
# the default timeout of 5s.
- export ASYNC_TEST_TIMEOUT=15
# We use "python -m coverage" instead of the "bin/coverage" script
# so we can pass additional arguments to python.
# coverage needs a function that was removed in python 3.6 so we can't
# run it with nightly cpython.
- if [[ $TRAVIS_PYTHON_VERSION != nightly ]]; then export TARGET="-m coverage run $TARGET"; fi
2013-12-30 16:37:58 +00:00
- python $TARGET
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --ioloop=tornado.platform.select.SelectIOLoop; fi
2013-12-30 16:37:58 +00:00
- python -O $TARGET
- LANG=C python $TARGET
- LANG=en_US.utf-8 python $TARGET
- if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then python -bb $TARGET; fi
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient; fi
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --ioloop=tornado.platform.twisted.TwistedIOLoop; fi
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --resolver=tornado.platform.twisted.TwistedResolver; fi
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --ioloop=tornado.ioloop.PollIOLoop --ioloop_time_monotonic; fi
#- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then python $TARGET --resolver=tornado.platform.caresresolver.CaresResolver; fi
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy3' ]]; then ../nodeps/bin/python -m tornado.test.runtests; fi
# make coverage reports for Codecov to find
- if [[ $TRAVIS_PYTHON_VERSION != nightly ]]; then coverage xml; fi
- export TORNADO_EXTENSION=0
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then cd ../docs && mkdir sphinx-out && sphinx-build -E -n -W -b html . sphinx-out; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' || $TRAVIS_PYTHON_VERSION == 3.6 ]]; then cd ../docs && mkdir sphinx-doctest-out && sphinx-build -E -n -b doctest . sphinx-out; fi
2013-12-30 16:37:58 +00:00
after_success:
# call codecov from project root
- if [[ $TRAVIS_PYTHON_VERSION != nightly ]]; then cd ../ && codecov; fi