From 798136787f57a39fdb1f78b299a5e15f743422bf Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Wed, 10 Apr 2013 16:30:32 +0200 Subject: [PATCH 1/5] Configuration to run coveralls on py33 --- .gitignore | 4 +++- .travis.yml | 3 ++- tox.ini | 7 ++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ad9b77e4..4755f455 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,11 @@ *~ *.swp *.swo +*.pyc .ropeproject .tox -*.pyc +.coveralls.yml +.coverage /build/ /docs/_build/ /dist/ diff --git a/.travis.yml b/.travis.yml index a85a4d06..8c29ecb1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ env: - TOXENV=py32 - TOXENV=py33 install: - - pip install --quiet --use-mirrors tox + - pip install --quiet --use-mirrors tox coveralls script: - tox + - if [ $TOXENV == "py33" ]; then coveralls; fi diff --git a/tox.ini b/tox.ini index 8fa50614..c6bf7e98 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ envlist = py25, py26, py27, py32, py33 deps = pytest commands = - py.test [] + py.test jedi [testenv:py25] deps = simplejson @@ -14,3 +14,8 @@ deps = deps = unittest2 {[testenv]deps} +[testenv:py33] +deps = + pytest-cov +commands = + py.test --cov jedi From af22409059e0cb420628c3f97a0f9945d37ea087 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Wed, 10 Apr 2013 17:08:20 +0200 Subject: [PATCH 2/5] Separate tox env for coverage check --- .travis.yml | 3 ++- tox.ini | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8c29ecb1..333bcc1b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,9 @@ env: - TOXENV=py27 - TOXENV=py32 - TOXENV=py33 + - TOXENV=cov install: - pip install --quiet --use-mirrors tox coveralls script: - tox - - if [ $TOXENV == "py33" ]; then coveralls; fi + - if [ $TOXENV == "cov" ]; then coveralls; fi diff --git a/tox.ini b/tox.ini index c6bf7e98..205c8594 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ envlist = py25, py26, py27, py32, py33 deps = pytest commands = - py.test jedi + py.test [] [testenv:py25] deps = simplejson @@ -14,8 +14,9 @@ deps = deps = unittest2 {[testenv]deps} -[testenv:py33] +[testenv:cov] deps = pytest-cov + {[testenv]deps} commands = - py.test --cov jedi + py.test --cov jedi [] From 8e4a76ca1b41a1fd4d87140882b83d178563b69c Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Wed, 10 Apr 2013 17:09:36 +0200 Subject: [PATCH 3/5] Allow TOXENV=cov to fail in travis-ci --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 333bcc1b..03af3394 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,10 @@ env: - TOXENV=py32 - TOXENV=py33 - TOXENV=cov +matrix: + allow_failures: + - env: + - TOXENV=cov install: - pip install --quiet --use-mirrors tox coveralls script: From 658bcb6421770ab0e6a622bce2da0e5962224eb9 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Wed, 10 Apr 2013 17:23:50 +0200 Subject: [PATCH 4/5] Install coveralls only when needed --- .travis.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 03af3394..57ea5c5e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,11 @@ matrix: - env: - TOXENV=cov install: - - pip install --quiet --use-mirrors tox coveralls + - pip install --quiet --use-mirrors tox script: - tox - - if [ $TOXENV == "cov" ]; then coveralls; fi +after_script: + - if [ $TOXENV == "cov" ]; then + pip install --quiet --use-mirrors coveralls + coveralls; + fi From 944b3200a0ffca18d80159fc919756962f3ca990 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Wed, 10 Apr 2013 17:28:15 +0200 Subject: [PATCH 5/5] Fix allow_failures syntax allow_failures.env requires a string when matrix/global is not used? Also, indent is changed to fit with other entries. --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 57ea5c5e..51d30e2d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,9 +7,8 @@ env: - TOXENV=py33 - TOXENV=cov matrix: - allow_failures: - - env: - - TOXENV=cov + allow_failures: + - env: TOXENV=cov install: - pip install --quiet --use-mirrors tox script: