From ec98eb6f792ed16b73628dfc70962a72d4b3fb7e Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 13 Feb 2019 22:08:53 +0100 Subject: [PATCH 1/9] Travis: use Ubuntu Xenial, add pypy3 --- .travis.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ea75028d..c6db1a04 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,12 @@ -sudo: false +dist: xenial language: python python: - '2.7' - '3.4' - '3.5' - '3.6' -- 'pypy-5.4' +- 'pypy2.7-6.0' +- 'pypy3.5-6.0' env: - DEPS="pytest~=2.9.0" - DEPS="pytest~=3.0.0" @@ -17,7 +18,7 @@ matrix: - python: '2.7' # using a different option due to pytest-addopts pytester issues env: PYTEST_XADDOPTS="-n 3 --runslowtests" DEPS="pytest~=3.0.0 pytest-xdist" - + - stage: deploy python: '3.6' env: @@ -33,9 +34,7 @@ matrix: on: tags: true repo: pytest-dev/py - - allow_failures: - - python: 'pypy-5.4' + install: - pip install -U setuptools setuptools_scm - pip install $DEPS From 16a2cfab6dad2910315a7df025bf9a2c744180b8 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 13 Feb 2019 22:50:46 +0100 Subject: [PATCH 2/9] Keep pypy with allow_failures --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index c6db1a04..2d7cd735 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,9 @@ matrix: tags: true repo: pytest-dev/py + allow_failures: + - python: 'pypy2.7-6.0' + - python: 'pypy3.5-6.0' install: - pip install -U setuptools setuptools_scm - pip install $DEPS From 6c7e3245b0d4678070af0d59321474c2b72c484f Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 13 Feb 2019 22:52:17 +0100 Subject: [PATCH 3/9] Travis: upgrade pip Hopefully helps with py2 failure: https://travis-ci.org/pytest-dev/py/jobs/492914885 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2d7cd735..27866886 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,7 @@ matrix: - python: 'pypy2.7-6.0' - python: 'pypy3.5-6.0' install: -- pip install -U setuptools setuptools_scm +- pip install -U pip setuptools setuptools_scm - pip install $DEPS - pip install -U . --force-reinstall script: From 0fb12efe83834822186a98966d2e7267bf1161bd Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 13 Feb 2019 23:24:50 +0100 Subject: [PATCH 4/9] tox.ini: use -ra --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 71aa823d..dccf6e59 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,7 @@ envlist=py{27,34,35,36}-pytest{29,30,31},py37-pytest{30,31} changedir=testing commands= pip install -U .. # hande the install order fallout since pytest depends on pip - py.test --confcutdir=.. -rfsxX --junitxml={envlogdir}/junit-{envname}.xml [] + py.test --confcutdir=.. --junitxml={envlogdir}/junit-{envname}.xml [] deps= attrs pytest29: pytest~=2.9.0 @@ -20,14 +20,14 @@ deps= pytest-xdist<=1.16.0 commands= pip install -U .. # hande the install order fallout since pytest depends on pip - py.test -n3 -rfsxX --confcutdir=.. --runslowtests \ + py.test -n3 --confcutdir=.. --runslowtests \ --junitxml={envlogdir}/junit-{envname}.xml [] [testenv:jython] changedir=testing commands= {envpython} -m pip install -U .. # hande the install order fallout since pytest depends on pip - {envpython} -m pytest --confcutdir=.. -rfsxX --junitxml={envlogdir}/junit-{envname}0.xml {posargs:io_ code} + {envpython} -m pytest --confcutdir=.. --junitxml={envlogdir}/junit-{envname}0.xml {posargs:io_ code} [pytest] rsyncdirs = conftest.py py doc testing From feaa4b3f992519b338c37d0464330b1a4f2d5bbf Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 13 Feb 2019 23:34:09 +0100 Subject: [PATCH 5/9] Travis: fix py27-runslowtests job --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 27866886..6cecbd77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ matrix: include: - python: '2.7' # using a different option due to pytest-addopts pytester issues - env: PYTEST_XADDOPTS="-n 3 --runslowtests" DEPS="pytest~=3.0.0 pytest-xdist" + env: PYTEST_XADDOPTS="-n auto --runslowtests" DEPS="pytest~=3.0.0 pytest-xdist<1.25" - stage: deploy python: '3.6' From 649545e0f97fd3dd286ffdee359718f87fe6d5b2 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 13 Feb 2019 23:36:37 +0100 Subject: [PATCH 6/9] Travis: add stages config to not consider deploy by default --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6cecbd77..ea804a07 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,10 @@ env: - DEPS="pytest~=3.0.0" #- DEPS="pytest~=3.1.0" +stages: + - name: deploy + if: tag IS present + matrix: include: From 987c8e0161359997f93140e9ca74ebeb1fc527ca Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 13 Feb 2019 23:40:10 +0100 Subject: [PATCH 7/9] Travis: fix py27-runslowtests job (pytest-forked) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ea804a07..ef69d3f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ matrix: include: - python: '2.7' # using a different option due to pytest-addopts pytester issues - env: PYTEST_XADDOPTS="-n auto --runslowtests" DEPS="pytest~=3.0.0 pytest-xdist<1.25" + env: PYTEST_XADDOPTS="-n auto --runslowtests" DEPS="pytest~=3.0.0 pytest-xdist<1.25 pytest-forked<0.3" - stage: deploy python: '3.6' From 1114b416ac537f65fe4fc69759241a2e684f700f Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 13 Feb 2019 23:42:07 +0100 Subject: [PATCH 8/9] Travis: indent/whitespace, disable pypy3 again --- .travis.yml | 69 ++++++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/.travis.yml b/.travis.yml index ef69d3f9..af12d24f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,50 +1,53 @@ dist: xenial language: python + python: -- '2.7' -- '3.4' -- '3.5' -- '3.6' -- 'pypy2.7-6.0' -- 'pypy3.5-6.0' + - '2.7' + - '3.4' + - '3.5' + - '3.6' + # - 'pypy2.7-6.0' + - 'pypy3.5-6.0' + env: -- DEPS="pytest~=2.9.0" -- DEPS="pytest~=3.0.0" -#- DEPS="pytest~=3.1.0" + - DEPS="pytest~=2.9.0" + - DEPS="pytest~=3.0.0" + #- DEPS="pytest~=3.1.0" stages: - name: deploy if: tag IS present matrix: - include: - - python: '2.7' - # using a different option due to pytest-addopts pytester issues - env: PYTEST_XADDOPTS="-n auto --runslowtests" DEPS="pytest~=3.0.0 pytest-xdist<1.25 pytest-forked<0.3" - - - stage: deploy - python: '3.6' - env: - install: pip install -U setuptools setuptools_scm - script: skip - deploy: - provider: pypi - user: nicoddemus - distributions: sdist bdist_wheel - skip_upload_docs: true - password: - secure: VNYW/sZoD+9DzKCe6vANNXXJR7jP7rwySafQ33N1jAnCrdylQjEN/p6tSfUe8jDi3wDpLPL9h8pwfxuUT7CRxglHov3Qe7zSeywixvHan5aFahQiQ8+gucYIM7wITHH3oQs7jN35pnhdnF+QlW2+eDCL6qOLU5XwuRhsDKXjQ/hUWR5hlX5EniD1gzyKEf6j1YCpST87tKpeLwVEYEmsucdkUZuXhxDtyaWQHWiPsLWwh/slQtUJEHeLF26r8UxFy0RiGne9jR+CzRfH5ktcA9/pArvp4VuwOii+1TDxVSYP7+I8Z+eUKN9JBg12QLaHwoIN/8J+MvHCkuf+OGSLM3sEyNRJGDev372xg3K7ylIkeeK4WXirKEp2ojgN8tniloDjnwdu/gPWBnrXuooA60tNoByHFa8KbMZAr2B2sQeMxD4VZGr1N8l0rX4gRTrwvdk3i3ulLKVSwkXaGn+GrfZTTboa7dEnpuma8tv1niNCSpStYIy7atS8129+5ijV3OC8DzOMh/rVbO9WsDb/RPG3yjFiDvEJPIPeE0l/m5u42QBqtdZSS2ia7UWTJBiEY09uFMTRmH5hhE/1aiYBbvAztf5CReUbeKdSQz3L8TTSZqewtFZmXTkX97/xQnrEpsnGezIM2DNuMEuQG3MxGkNCxwbQKpx/bkHdrD75yMk= - on: - tags: true - repo: pytest-dev/py + - python: '2.7' + # using a different option due to pytest-addopts pytester issues + env: PYTEST_XADDOPTS="-n auto --runslowtests" DEPS="pytest~=3.0.0 pytest-xdist<1.25 pytest-forked<0.3" + + - stage: deploy + python: '3.6' + env: + install: pip install -U setuptools setuptools_scm + script: skip + deploy: + provider: pypi + user: nicoddemus + distributions: sdist bdist_wheel + skip_upload_docs: true + password: + secure: VNYW/sZoD+9DzKCe6vANNXXJR7jP7rwySafQ33N1jAnCrdylQjEN/p6tSfUe8jDi3wDpLPL9h8pwfxuUT7CRxglHov3Qe7zSeywixvHan5aFahQiQ8+gucYIM7wITHH3oQs7jN35pnhdnF+QlW2+eDCL6qOLU5XwuRhsDKXjQ/hUWR5hlX5EniD1gzyKEf6j1YCpST87tKpeLwVEYEmsucdkUZuXhxDtyaWQHWiPsLWwh/slQtUJEHeLF26r8UxFy0RiGne9jR+CzRfH5ktcA9/pArvp4VuwOii+1TDxVSYP7+I8Z+eUKN9JBg12QLaHwoIN/8J+MvHCkuf+OGSLM3sEyNRJGDev372xg3K7ylIkeeK4WXirKEp2ojgN8tniloDjnwdu/gPWBnrXuooA60tNoByHFa8KbMZAr2B2sQeMxD4VZGr1N8l0rX4gRTrwvdk3i3ulLKVSwkXaGn+GrfZTTboa7dEnpuma8tv1niNCSpStYIy7atS8129+5ijV3OC8DzOMh/rVbO9WsDb/RPG3yjFiDvEJPIPeE0l/m5u42QBqtdZSS2ia7UWTJBiEY09uFMTRmH5hhE/1aiYBbvAztf5CReUbeKdSQz3L8TTSZqewtFZmXTkX97/xQnrEpsnGezIM2DNuMEuQG3MxGkNCxwbQKpx/bkHdrD75yMk= + on: + tags: true + repo: pytest-dev/py allow_failures: - python: 'pypy2.7-6.0' - python: 'pypy3.5-6.0' + install: -- pip install -U pip setuptools setuptools_scm -- pip install $DEPS -- pip install -U . --force-reinstall + - pip install -U pip setuptools setuptools_scm + - pip install $DEPS + - pip install -U . --force-reinstall + script: -- py.test --lsof $PYTEST_XADDOPTS + - py.test --lsof $PYTEST_XADDOPTS From a54d2d325b0f63fa244a0096af574a0f0c255295 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 13 Feb 2019 23:51:36 +0100 Subject: [PATCH 9/9] Coverage --- .travis.yml | 10 ++++++++-- tox.ini | 7 +++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index af12d24f..4d82bc08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,9 +45,15 @@ matrix: - python: 'pypy3.5-6.0' install: - - pip install -U pip setuptools setuptools_scm + - pip install -U coverage coverage-enable-subprocess pip setuptools setuptools_scm - pip install $DEPS - pip install -U . --force-reinstall script: - - py.test --lsof $PYTEST_XADDOPTS + - coverage run -m pytest --lsof $PYTEST_XADDOPTS + +after_success: + - coverage combine + - coverage report -m + - coverage xml + - bash <(curl -s https://codecov.io/bash) -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -X fix -f coverage.xml -e TRAVIS_PYTHON_VERSION diff --git a/tox.ini b/tox.ini index dccf6e59..45f22524 100644 --- a/tox.ini +++ b/tox.ini @@ -32,3 +32,10 @@ commands= [pytest] rsyncdirs = conftest.py py doc testing addopts = -ra + +[coverage:run] +branch = 1 +source = . +parallel = 1 +[coverage:report] +include = py/*,testing/*