From 320fc0bedbfa8344340a92e45f02e01d93d56202 Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Fri, 21 Dec 2018 00:15:28 +0000 Subject: [PATCH 1/9] Ensure codecov failing results in travis job failing --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 98b6076f..82922798 100644 --- a/.travis.yml +++ b/.travis.yml @@ -113,7 +113,7 @@ install: - ${PIP} install codecov tox script: - tox tests - - codecov + - codecov --required - git stash --all # Restore fresh checkout - cibuildwheel --output-dir dist deploy: From 7bcc9c5afc46f717a5637cb86722e700a1942a82 Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Fri, 21 Dec 2018 00:35:08 +0000 Subject: [PATCH 2/9] Use pytest to test build wheel on osx With cibuildwheel the idea is to test the built wheels via the CIBW_TEST_COMMAND. If we use tox here, we're not actually testing the built wheel itself. --- .travis.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 82922798..7dcda0c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,8 +53,9 @@ matrix: - PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH" - PIP=pip - CIBW_BUILD=cp27-* - - CIBW_TEST_COMMAND="pushd {project}; tox tests ; popd" - - CIBW_BEFORE_BUILD="${PIP} install -U pip; ${PIP} install tox" + - CIBW_BEFORE_BUILD="${PIP} install -U pip" + - CIBW_TEST_REQUIRES="pytest!=3.3.0 psutil" + - CIBW_TEST_COMMAND="pytest {project}/tests" install: - ${PIP} install cibuildwheel==0.10.0 script: @@ -65,8 +66,9 @@ matrix: env: - PIP=pip2 - CIBW_BUILD=cp34-* - - CIBW_TEST_COMMAND="pushd {project}; tox tests ; popd" - - CIBW_BEFORE_BUILD="${PIP} install -U pip; ${PIP} install tox" + - CIBW_BEFORE_BUILD="${PIP} install -U pip; ${PIP} install pytest!=3.3.0 psutil" + - CIBW_TEST_REQUIRES="pytest!=3.3.0 psutil" + - CIBW_TEST_COMMAND="pytest {project}/tests" install: - ${PIP} install cibuildwheel==0.10.0 script: @@ -77,8 +79,9 @@ matrix: env: - PIP=pip2 - CIBW_BUILD=cp35-* - - CIBW_TEST_COMMAND="pushd {project}; tox tests ; popd" - - CIBW_BEFORE_BUILD="${PIP} install -U pip; ${PIP} install tox" + - CIBW_BEFORE_BUILD="${PIP} install -U pip" + - CIBW_TEST_REQUIRES="pytest!=3.3.0 psutil" + - CIBW_TEST_COMMAND="pytest {project}/tests" install: - ${PIP} install cibuildwheel==0.10.0 script: @@ -89,8 +92,9 @@ matrix: env: - PIP=pip2 - CIBW_BUILD=cp36-* - - CIBW_TEST_COMMAND="pushd {project}; tox tests ; popd" - - CIBW_BEFORE_BUILD="${PIP} install -U pip; ${PIP} install tox" + - CIBW_BEFORE_BUILD="${PIP} install -U pip" + - CIBW_TEST_REQUIRES="pytest!=3.3.0 psutil" + - CIBW_TEST_COMMAND="pytest {project}/tests" install: - ${PIP} install cibuildwheel==0.10.0 script: @@ -101,8 +105,9 @@ matrix: env: - PIP=pip2 - CIBW_BUILD=cp37-* - - CIBW_TEST_COMMAND="pushd {project}; tox tests ; popd" - - CIBW_BEFORE_BUILD="${PIP} install -U pip; ${PIP} install tox" + - CIBW_BEFORE_BUILD="${PIP} install -U pip" + - CIBW_TEST_REQUIRES="pytest!=3.3.0 psutil" + - CIBW_TEST_COMMAND="pytest {project}/tests" install: - ${PIP} install cibuildwheel==0.10.0 script: From 025709f4b65675b5472d6b4f4be7d41bc70efda8 Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Fri, 21 Dec 2018 09:35:07 +0000 Subject: [PATCH 3/9] Try running codecov as part of CIBW_TEST_COMMAND --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7dcda0c7..f54ea817 100644 --- a/.travis.yml +++ b/.travis.yml @@ -93,8 +93,8 @@ matrix: - PIP=pip2 - CIBW_BUILD=cp36-* - CIBW_BEFORE_BUILD="${PIP} install -U pip" - - CIBW_TEST_REQUIRES="pytest!=3.3.0 psutil" - - CIBW_TEST_COMMAND="pytest {project}/tests" + - CIBW_TEST_REQUIRES="pytest!=3.3.0 pytest-cov codecov psutil" + - CIBW_TEST_COMMAND="pytest --cov=lz4 {project}/tests; codecov --required" install: - ${PIP} install cibuildwheel==0.10.0 script: From fb85c3d7deb41c34c7b6f6c8b4ff73748b064aaf Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Fri, 21 Dec 2018 10:22:07 +0000 Subject: [PATCH 4/9] Add coveralls upload --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f54ea817..545ff38f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -93,8 +93,8 @@ matrix: - PIP=pip2 - CIBW_BUILD=cp36-* - CIBW_BEFORE_BUILD="${PIP} install -U pip" - - CIBW_TEST_REQUIRES="pytest!=3.3.0 pytest-cov codecov psutil" - - CIBW_TEST_COMMAND="pytest --cov=lz4 {project}/tests; codecov --required" + - CIBW_TEST_REQUIRES="pytest!=3.3.0 pytest-cov codecov psutil coveralls" + - CIBW_TEST_COMMAND="pytest --cov=lz4 {project}/tests; codecov --required; coveralls" install: - ${PIP} install cibuildwheel==0.10.0 script: From 2e0ec77dd4d287d60a9d2511dd0a3da7fbef38c6 Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Fri, 21 Dec 2018 18:51:33 +0000 Subject: [PATCH 5/9] Consolidate linux and osx builds --- .travis.yml | 56 +++++++++++++++-------------------------------------- 1 file changed, 16 insertions(+), 40 deletions(-) diff --git a/.travis.yml b/.travis.yml index 545ff38f..bbf03f4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,9 @@ +env: + global: + - CIBW_BEFORE_BUILD="pip install -U pip" + - CIBW_TEST_REQUIRES="pytest!=3.3.0 pytest-cov codecov psutil coveralls" + - CIBW_TEST_COMMAND="pytest --cov=lz4 {project}/tests && codecov --required ; coveralls" + matrix: include: - name: linux-py27 @@ -9,6 +15,7 @@ matrix: env: - PIP=pip - CIBW_BUILD=cp27-* + - name: linux-py34 language: python python: 3.4 @@ -18,6 +25,7 @@ matrix: env: - PIP=pip - CIBW_BUILD=cp34-* + - name: linux-py35 language: python python: 3.5 @@ -27,6 +35,7 @@ matrix: env: - PIP=pip3 - CIBW_BUILD=cp35-* + - name: linux-py36 language: python python: 3.6 @@ -36,6 +45,7 @@ matrix: env: - PIP=pip3 - CIBW_BUILD=cp36-* + - name: linux-py37 language: python python: 3.7 @@ -46,6 +56,7 @@ matrix: env: - PIP=pip3 - CIBW_BUILD=cp37-* + - name: osx-py27 os: osx language: generic @@ -53,73 +64,38 @@ matrix: - PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH" - PIP=pip - CIBW_BUILD=cp27-* - - CIBW_BEFORE_BUILD="${PIP} install -U pip" - - CIBW_TEST_REQUIRES="pytest!=3.3.0 psutil" - - CIBW_TEST_COMMAND="pytest {project}/tests" - install: - - ${PIP} install cibuildwheel==0.10.0 - script: - - cibuildwheel --output-dir dist + - name: osx-py34 os: osx language: generic env: - PIP=pip2 - CIBW_BUILD=cp34-* - - CIBW_BEFORE_BUILD="${PIP} install -U pip; ${PIP} install pytest!=3.3.0 psutil" - - CIBW_TEST_REQUIRES="pytest!=3.3.0 psutil" - - CIBW_TEST_COMMAND="pytest {project}/tests" - install: - - ${PIP} install cibuildwheel==0.10.0 - script: - - cibuildwheel --output-dir dist + - name: osx-py35 os: osx language: generic env: - PIP=pip2 - CIBW_BUILD=cp35-* - - CIBW_BEFORE_BUILD="${PIP} install -U pip" - - CIBW_TEST_REQUIRES="pytest!=3.3.0 psutil" - - CIBW_TEST_COMMAND="pytest {project}/tests" - install: - - ${PIP} install cibuildwheel==0.10.0 - script: - - cibuildwheel --output-dir dist + - name: osx-py36 os: osx language: generic env: - PIP=pip2 - CIBW_BUILD=cp36-* - - CIBW_BEFORE_BUILD="${PIP} install -U pip" - - CIBW_TEST_REQUIRES="pytest!=3.3.0 pytest-cov codecov psutil coveralls" - - CIBW_TEST_COMMAND="pytest --cov=lz4 {project}/tests; codecov --required; coveralls" - install: - - ${PIP} install cibuildwheel==0.10.0 - script: - - cibuildwheel --output-dir dist + - name: osx-py37 os: osx language: generic env: - PIP=pip2 - CIBW_BUILD=cp37-* - - CIBW_BEFORE_BUILD="${PIP} install -U pip" - - CIBW_TEST_REQUIRES="pytest!=3.3.0 psutil" - - CIBW_TEST_COMMAND="pytest {project}/tests" - install: - - ${PIP} install cibuildwheel==0.10.0 - script: - - cibuildwheel --output-dir dist + install: - - ${PIP} install -U pip - ${PIP} install cibuildwheel==0.10.0 - - ${PIP} install codecov tox script: - - tox tests - - codecov --required - - git stash --all # Restore fresh checkout - cibuildwheel --output-dir dist deploy: - provider: pypi From 5d519eb801ebc14785550d9b266680bff5a9e0ea Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Fri, 21 Dec 2018 19:48:52 +0000 Subject: [PATCH 6/9] Specify project root for codecov --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bbf03f4d..cc54bcd6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ env: global: - CIBW_BEFORE_BUILD="pip install -U pip" - CIBW_TEST_REQUIRES="pytest!=3.3.0 pytest-cov codecov psutil coveralls" - - CIBW_TEST_COMMAND="pytest --cov=lz4 {project}/tests && codecov --required ; coveralls" + - CIBW_TEST_COMMAND="pytest --cov=lz4 {project}/tests && codecov --required --root {project}; coveralls" matrix: include: From b697bdf46f641dc2f078a3204a7b673308753d7d Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Fri, 21 Dec 2018 19:52:57 +0000 Subject: [PATCH 7/9] Run codecov and coveralls from project directory --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cc54bcd6..f656c42e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ env: global: - CIBW_BEFORE_BUILD="pip install -U pip" - CIBW_TEST_REQUIRES="pytest!=3.3.0 pytest-cov codecov psutil coveralls" - - CIBW_TEST_COMMAND="pytest --cov=lz4 {project}/tests && codecov --required --root {project}; coveralls" + - CIBW_TEST_COMMAND="pytest --cov=lz4 {project}/tests && cp .coverage {project} && pushd {project} && codecov --required; coveralls" matrix: include: From bc87e556fc5252dc2cca1812d05efa50739bb4ec Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Sat, 22 Dec 2018 01:34:07 +0000 Subject: [PATCH 8/9] Try and preserve environment on linux --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f656c42e..80d3e6fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ env: global: - CIBW_BEFORE_BUILD="pip install -U pip" - CIBW_TEST_REQUIRES="pytest!=3.3.0 pytest-cov codecov psutil coveralls" - - CIBW_TEST_COMMAND="pytest --cov=lz4 {project}/tests && cp .coverage {project} && pushd {project} && codecov --required; coveralls" + - CIBW_TEST_COMMAND="pytest --cov=lz4 {project}/tests && cp .coverage {project} && pushd {project} && source local_env.sh && codecov --required; coveralls" matrix: include: @@ -96,6 +96,7 @@ matrix: install: - ${PIP} install cibuildwheel==0.10.0 script: + - env > local_env.sh - cibuildwheel --output-dir dist deploy: - provider: pypi From 7a444a879a2bde6eedcbe78f4b3d7974f0c39da2 Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Sat, 22 Dec 2018 08:26:15 +0000 Subject: [PATCH 9/9] Print out env ahead of testing --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 80d3e6fc..4273d8b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ env: global: - CIBW_BEFORE_BUILD="pip install -U pip" - CIBW_TEST_REQUIRES="pytest!=3.3.0 pytest-cov codecov psutil coveralls" - - CIBW_TEST_COMMAND="pytest --cov=lz4 {project}/tests && cp .coverage {project} && pushd {project} && source local_env.sh && codecov --required; coveralls" + - CIBW_TEST_COMMAND="env && pytest --cov=lz4 {project}/tests && cp .coverage {project} && pushd {project} && codecov --required; coveralls" matrix: include: @@ -96,7 +96,6 @@ matrix: install: - ${PIP} install cibuildwheel==0.10.0 script: - - env > local_env.sh - cibuildwheel --output-dir dist deploy: - provider: pypi