diff --git a/.travis.yml b/.travis.yml index 1c4fc86..c62ab8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,39 +8,26 @@ branches: only: - master -python: - - "2.7" - #- "pypy" - env: - - MODE=inplace - - MODE=sdist - - MODE=wheel + - TOXENV=py27-twlatest + - TOXENV=py27-twtrunk + - TOXENV=py27-tw14 + # Test inplace on one variant + - TOXENV=py27-twlatest DEVELOP=--develop + +matrix: + allow_failures: + - env: TOXENV=py27-twtrunk install: - # Upgrade pip/setuptools - - pip install -U pip setuptools - # Tools for checking coverage and uploading to Codecov - - pip install coverage codecov - - | - python setup.py --version - if [ "${MODE}" == "inplace" ]; then - pip install --editable . - elif [ "${MODE}" == "sdist" ]; then - python setup.py sdist - pip install dist/Mantissa-"$(python setup.py --version)".tar.gz - elif [ "${MODE}" == "wheel" ]; then - pip install wheel - python setup.py bdist_wheel - pip install dist/Mantissa-"$(python setup.py --version)"-py2-none-any.whl - fi + - pip install -U pip setuptools wheel + - pip install tox codecov script: - - cd /tmp && coverage run --branch --source=xmantissa $(type -p trial) xmantissa - - cd /tmp && coverage report -m + - tox ${DEVELOP} after_success: - - cd "${TRAVIS_BUILD_DIR}" && mv /tmp/.coverage . && codecov + - mv .tox/.coverage . && codecov notifications: email: false diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..2f482ce --- /dev/null +++ b/tox.ini @@ -0,0 +1,19 @@ +[tox] +envlist={py27}-{twtrunk,twlatest,tw14} + +[testenv] +# Remove this once the PyPy branch lands: +setenv = + PYTHONHASHSEED = 0 +changedir={toxworkdir} +deps= + twlatest: Twisted + twtrunk: https://github.com/twisted/twisted/archive/trunk.zip + tw14: Twisted==14.0.0 + coverage +commands= + pip list + coverage run {envdir}/bin/trial \ + --temp-directory={envdir}/_trial_temp {posargs:xmantissa} + coverage report --rcfile={toxinidir}/.coveragerc + coverage html --rcfile={toxinidir}/.coveragerc --directory {envdir}/_coverage