From bc05b8def71d10400973cd69904dc1bbb0bde9e8 Mon Sep 17 00:00:00 2001 From: Oliver Palmer Date: Sat, 30 Jan 2016 10:53:10 -0500 Subject: [PATCH 1/6] use requirements_test.txt to drive test requirements --- .ci/travis/install.sh | 3 ++- README.rst | 3 ++- appveyor.yml | 2 +- requirements_test.txt | 4 ++++ 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 requirements_test.txt diff --git a/.ci/travis/install.sh b/.ci/travis/install.sh index e70ca477..7a8b35da 100755 --- a/.ci/travis/install.sh +++ b/.ci/travis/install.sh @@ -16,6 +16,7 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then fi pip install --upgrade pip -pip install wheel coverage==3.7.1 python-coveralls mock +pip install --upgrade setuptools +pip install -r requirements_test.txt python setup.py develop pip freeze diff --git a/README.rst b/README.rst index eb6d5191..ee04ab1a 100644 --- a/README.rst +++ b/README.rst @@ -83,6 +83,7 @@ checkout the configuration files used to run the tests on Travis and Appveyor: virtualenv env . env/bin/activate + pip install -r requirements_test.txt pip install -e . --egg trial tests @@ -90,7 +91,7 @@ checkout the configuration files used to run the tests on Travis and Appveyor: virtualenv env env\Scripts\activate - %VIRTUALE_ENV%\Scripts\pip.exe install wheel + %VIRTUALE_ENV%\Scripts\pip.exe -r requirements_test.txt %VIRTUALE_ENV%\Scripts\pip.exe install -e . --egg %VIRTUALE_ENV%\Scripts\python.exe %VIRTUALE_ENV%\Scripts\trial.py tests diff --git a/appveyor.yml b/appveyor.yml index 615b0c77..5a196b8a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,7 +20,7 @@ clone_folder: c:\\project test_script: - ps: cd C:\\project - - "%WITH_COMPILER% %PYTHON%\\Scripts\\pip.exe install wheel mock coverage" + - "%WITH_COMPILER% %PYTHON%\\Scripts\\pip.exe install -r C:\\project\\requirements_test.txt" - "%WITH_COMPILER% %PYTHON%\\Scripts\\pip.exe install ." # Twisted's trial does not build entrypoints on Windows so we have diff --git a/requirements_test.txt b/requirements_test.txt new file mode 100644 index 00000000..f1b3a9fb --- /dev/null +++ b/requirements_test.txt @@ -0,0 +1,4 @@ +codecov +coverage==3.7.1 +mock +wheel From c5c3671894ffe04cacd93ec97571361bbe69c046 Mon Sep 17 00:00:00 2001 From: Oliver Palmer Date: Sat, 30 Jan 2016 10:55:21 -0500 Subject: [PATCH 2/6] upload code coverage --- .ci/travis/test.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.ci/travis/test.sh b/.ci/travis/test.sh index dbff0667..df9ce8ec 100755 --- a/.ci/travis/test.sh +++ b/.ci/travis/test.sh @@ -2,15 +2,18 @@ if [[ "$READTHEDOCS" == "1" ]]; then make -C docs html -fi - -if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - if which pyenv > /dev/null; then - eval "$(pyenv init -)" +else + if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + if which pyenv > /dev/null; then + eval "$(pyenv init -)" + fi + pyenv activate virtualenv + coverage run --branch $VIRTUAL_ENV/bin/trial tests + else + coverage run --branch `which trial` tests/ fi - pyenv activate virtualenv - coverage run --branch $VIRTUAL_ENV/bin/trial tests -else - coverage run --branch `which trial` tests/ + # Upload code coverage to codecov.io + coverage xml + codecov fi From 54bb0eeed11e8852ff0c4cc350c07d446f7f0c21 Mon Sep 17 00:00:00 2001 From: Oliver Palmer Date: Sat, 30 Jan 2016 10:58:51 -0500 Subject: [PATCH 3/6] removing 'after_success' block --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3f42ce7c..85145f19 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,3 @@ install: script: - ./.ci/travis/test.sh - -after_success: - - coveralls From 3662b441a1e0e61910211b3df70ba4efabf4c471 Mon Sep 17 00:00:00 2001 From: Oliver Palmer Date: Sat, 30 Jan 2016 11:01:04 -0500 Subject: [PATCH 4/6] add codecov to appveyor --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 5a196b8a..55757afd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,7 +29,8 @@ test_script: after_test: - "%WITH_COMPILER% %PYTHON%\\python.exe setup.py bdist_wheel" - - "%PYTHON%\\Scripts\\coverage.exe report" + - "%PYTHON%\\Scripts\\coverage.exe xml" + - "%PYTHON%\\Scripts\\codecov.exe --required" artifacts: - path: dist\* From 0fa12a43bbec59416a90ce77ac1076ac07e9f08b Mon Sep 17 00:00:00 2001 From: Oliver Palmer Date: Sat, 30 Jan 2016 11:01:36 -0500 Subject: [PATCH 5/6] fix build artifacts --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 55757afd..dbccda22 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -33,4 +33,5 @@ after_test: - "%PYTHON%\\Scripts\\codecov.exe --required" artifacts: - - path: dist\* + - path: dist\.whl + - path: .coverage From a4cdfa63432e51c094bc01372dbe84528c9a603d Mon Sep 17 00:00:00 2001 From: Oliver Palmer Date: Sat, 30 Jan 2016 11:02:07 -0500 Subject: [PATCH 6/6] adding --required to codecov call on linux --- .ci/travis/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/travis/test.sh b/.ci/travis/test.sh index df9ce8ec..d922fc5c 100755 --- a/.ci/travis/test.sh +++ b/.ci/travis/test.sh @@ -15,5 +15,5 @@ else # Upload code coverage to codecov.io coverage xml - codecov + codecov --required fi