Skip to content

Commit

Permalink
travis: Integrate the 'tox-travis' plugin
Browse files Browse the repository at this point in the history
This allows us to greatly simplify the '.travis.yml' file and eventually
remove even more Makefile targets. This involves adding two new targets
to the list of default targets run by tox - docs and mypy - and adding
an addition 'travis' section per the 'tox-travis' docs [1]

[1] https://tox-travis.readthedocs.io/en/stable/toxenv.html#advanced-configuration

Signed-off-by: Stephen Finucane <stephen@that.guru>
  • Loading branch information
stephenfin committed Oct 4, 2017
1 parent 8794dc9 commit 40f320e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 25 deletions.
29 changes: 7 additions & 22 deletions .travis.yml
Expand Up @@ -4,45 +4,30 @@ dist: trusty
cache:
directories:
- $HOME/.cache/pip

python:
- "pypy-5.4.1"
- "3.6"
- "3.5"
- "3.4"
- "2.7"
- "nightly"

env:
global:
- TEST='-v --durations 25'
- PYTHONFAULTHANDLER=x
- PYTHONWARNINGS=all
- SKIP_LATEX_BUILD=1
matrix:
- DOCUTILS=0.13.1
- DOCUTILS=0.14
matrix:
exclude:
- python: "3.4"
env: DOCUTILS=0.13.1
- python: "3.5"
env: DOCUTILS=0.13.1
- python: "3.6"
env: DOCUTILS=0.13.1
- python: nightly
env: DOCUTILS=0.13.1
- python: "pypy-5.4.1"
env: DOCUTILS=0.13.1

addons:
apt:
packages:
- graphviz
- imagemagick

install:
- pip install -U pip setuptools
- pip install docutils==$DOCUTILS
- pip install -r test-reqs.txt
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then python3.6 -m pip install mypy typed-ast; fi
- pip install tox-travis

script:
- flake8
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then make type-check test-async; fi
- if [[ $TRAVIS_PYTHON_VERSION != '3.6' ]]; then make test; fi
- tox
11 changes: 8 additions & 3 deletions tox.ini
@@ -1,5 +1,12 @@
[tox]
envlist=flake8,py27,py34,py35,py36,pypy,du14,du13,du12,du11
envlist=docs,flake8,mypy,py27,py34,py35,py36,pypy,du14,du13,du12,du11

[travis]
python =
2.7: py27, flake8, docs
3.4: py34, du11, du12, du13, du14
3.5: py35, mypy
3.6: py36

[testenv]
passenv = https_proxy http_proxy no_proxy
Expand All @@ -16,7 +23,6 @@ setenv =
PYTHONDONTWRITEBYTECODE = true
commands=
{envpython} -Wall tests/run.py --ignore tests/py35 --cov=sphinx {posargs}
sphinx-build -q -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html

[testenv:flake8]
deps=flake8
Expand All @@ -41,7 +47,6 @@ deps=
{[testenv]deps}
commands=
{envpython} -Wall tests/run.py --cov=sphinx {posargs}
sphinx-build -q -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html

[testenv:mypy]
deps=
Expand Down

0 comments on commit 40f320e

Please sign in to comment.