diff --git a/.appveyor.yml b/.appveyor.yml index cbc93200..984e2b7f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,6 +2,7 @@ environment: global: PATH: "C:\\Python27\\Scripts\\;%PATH%" + PYTEST_COMMAND: "coverage run -m pytest" matrix: - TOXENV: py27-base - TOXENV: py27-optional @@ -16,7 +17,7 @@ environment: install: - git submodule update --init --recursive - - python -m pip install tox + - python -m pip install tox codecov build: off @@ -25,3 +26,6 @@ test_script: after_test: - python debug-info.py + +on_success: + - codecov diff --git a/.travis.yml b/.travis.yml index 07fdff6f..c2e65375 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,20 +12,21 @@ sudo: false cache: pip env: - - USE_OPTIONAL=true - - USE_OPTIONAL=false - - SIX_VERSION=1.9 USE_OPTIONAL=true + global: + - PYTEST_COMMAND="coverage run -m pytest" + matrix: + - TOXENV=optional + - TOXENV=base + - TOXENV=six19-optional install: - - ./requirements-install.sh + - pip install tox codecov script: - - if [[ $TRAVIS_PYTHON_VERSION == pypy* ]]; then py.test; fi - - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage run -m pytest; fi - - bash flake8-run.sh + - tox after_script: - python debug-info.py after_success: - - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage combine && codecov; fi + - codecov diff --git a/requirements-test.txt b/requirements-test.txt index 40df78d4..4e223a3f 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,6 +1,10 @@ -r requirements.txt +tox + flake8<3.0 -pytest + +pytest==3.2.5 +coverage pytest-expect>=1.1,<2.0 mock diff --git a/tox.ini b/tox.ini index 42492fb7..e07ef670 100644 --- a/tox.ini +++ b/tox.ini @@ -1,21 +1,23 @@ [tox] -envlist = {py27,py33,py34,py35,py36,pypy}-{base,optional} +envlist = {py27,py33,py34,py35,py36,pypy}-{base,six19,optional} [testenv] deps = - flake8<3.0 - pytest - pytest-expect>=1.1,<2.0 - mock - base: six - base: webencodings optional: -r{toxinidir}/requirements-optional.txt + -r{toxinidir}/requirements-test.txt doc: Sphinx +passenv = + PYTEST_COMMAND + COVERAGE_RUN_OPTIONS commands = - {envbindir}/py.test {posargs} + six19: pip install six==1.9 + {env:PYTEST_COMMAND:{envbindir}/py.test} {posargs} flake8 {toxinidir} [testenv:doc] changedir = doc commands = sphinx-build -b html . _build + +[flake8] +exclude = ./.tox