diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ac630f4 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,46 @@ +language: python +sudo: false +cache: pip +env: + global: + - LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so + - SEGFAULT_SIGNALS=all +matrix: + include: + - python: '3.6' + env: + - TOXENV=check + - python: '2.7' + env: + - TOXENV=py27,report + - python: '3.4' + env: + - TOXENV=py34,report + - python: '3.5' + env: + - TOXENV=py35,report + - python: '3.6' + env: + - TOXENV=py36,report + - python: 'pypy-5.4' + env: + - TOXENV=pypy,report +before_install: +- python --version +- uname -a +- lsb_release -a +install: +- pip install tox +- virtualenv --version +- easy_install --version +- pip --version +- tox --version +script: +- tox -v +after_failure: +- more .tox/log/* | cat +- more .tox/*/log/* | cat +notifications: + email: + on_success: never + on_failure: always diff --git a/tox.ini b/tox.ini index 3e043cb..0c663ec 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,14 @@ [tox] -envlist = clean, check, py{27,34,35,36}, report +envlist = clean, check, py{27,34,35,36,py}, report [testenv] +basepython = + {py27,docs}: {env:TOXPYTHON:python2.7} + py34: {env:TOXPYTHON:python3.4} + py35: {env:TOXPYTHON:python3.5} + py36: {env:TOXPYTHON:python3.6} + pypy: {env:TOXPYTHON:pypy} + {clean,check,report}: python3 setenv = PYTHONPATH={toxinidir}/tests PYTHONUNBUFFERED=yes @@ -10,16 +17,26 @@ passenv = deps = -rrequirements.txt -rtest-requirements.txt + pytest-travis-fold +usedevelop = false commands = {posargs:py.test --cov --cov-report=term-missing -vv tests/} +[testenv:docs] +deps = + -r{toxinidir}/docs/requirements.txt +commands = + sphinx-build {posargs:-E} -b doctest docs dist/docs + sphinx-build {posargs:-E} -b html docs dist/docs + sphinx-build -b linkcheck docs dist/docs + [testenv:check] deps = docutils flake8 - readme-renderer - pygments isort + pygments + readme-renderer skip_install = true commands = python setup.py check --strict --metadata --restructuredtext @@ -27,21 +44,14 @@ commands = isort --verbose --check-only --diff --recursive pymaven/ tests/ setup.py [testenv:clean] -commands = coverage erase -skip_install = true deps = coverage - -[testenv:codecov] -deps = - codecov skip_install = true -commands = - coverage xml --ignore-errors - codecov [] +commands = coverage erase [testenv:report] deps = coverage skip_install = true commands = - coverage combine + coverage combine --append coverage report + coverage html