Browse Source

Merge pull request #1843 from celery/coveralls

Coveralls support
Ask Solem Hoel 11 years ago
parent
commit
60725649eb
5 changed files with 39 additions and 36 deletions
  1. 6 0
      .coveragerc
  2. 20 6
      .travis.yml
  3. 1 0
      requirements/test-ci.txt
  4. 0 4
      setup.cfg
  5. 12 26
      tox.ini

+ 6 - 0
.coveragerc

@@ -0,0 +1,6 @@
+[run]
+branch = 1
+cover_pylib = 0
+omit = celery.utils.debug,celery.tests.*,celery.bin.graph
+[report]
+omit = */python?.?/*,*/site-packages/*,*/pypy/*

+ 20 - 6
.travis.yml

@@ -1,8 +1,22 @@
 language: python
 python:
-    - 2.6
-    - 2.7
-    - 3.3
-install:
-    - pip install --use-mirrors tox
-script: TOXENV=py$(echo $TRAVIS_PYTHON_VERSION | tr -d .) tox -v
+  - 2.6
+  - 2.7
+  - 3.3
+  - pypy
+before_install:
+  - |
+    deactivate
+    if python --version |& grep PyPy; then
+      sudo apt-add-repository --yes ppa:pypy/ppa
+      sudo apt-get update
+      sudo apt-get install pypy
+      source ~/virtualenv/pypy/bin/activate
+    fi
+    python --version
+    uname -a
+    lsb_release -a
+    sudo pip install tox
+script: tox -v -e $TRAVIS_PYTHON_VERSION -- -v
+after_success:
+  - .tox/$TRAVIS_PYTHON_VERSION/bin/coveralls

+ 1 - 0
requirements/test-ci.txt

@@ -1,4 +1,5 @@
 coverage>=3.0
+coveralls
 redis
 #pymongo
 #SQLAlchemy

+ 0 - 4
setup.cfg

@@ -1,9 +1,5 @@
 [nosetests]
 where = celery/tests
-cover3-branch = 1
-cover3-html = 1
-cover3-package = celery
-cover3-exclude = celery.utils.debug,celery.tests.*,celery.bin.graph
 
 [build_sphinx]
 source-dir = docs/

+ 12 - 26
tox.ini

@@ -1,46 +1,37 @@
 [tox]
-envlist = py26,py27,py33,pypy
+envlist =
+    2.6,
+    2.7,
+    3.3,
+    pypy
 
 [testenv]
 sitepackages = False
 commands = nosetests
 
-[testenv:py33]
+[testenv:3.3]
 basepython = python3.3
 deps = -r{toxinidir}/requirements/default.txt
        -r{toxinidir}/requirements/test3.txt
        -r{toxinidir}/requirements/test-ci.txt
 commands = {toxinidir}/extra/release/removepyc.sh {toxinidir}
-           pip install anyjson
-           nosetests -vd celery.tests                          \
-               --with-xunit                                    \
-                 --xunit-file="{toxinidir}/nosetests.xml"
+           nosetests celery.tests --with-coverage --cover-inclusive --cover-erase []
 
-[testenv:py27]
+[testenv:2.7]
 basepython = python2.7
 deps = -r{toxinidir}/requirements/default.txt
        -r{toxinidir}/requirements/test.txt
        -r{toxinidir}/requirements/test-ci.txt
 commands = {toxinidir}/extra/release/removepyc.sh {toxinidir}
-           pip install anyjson
-           nosetests -v --with-xunit                            \
-                     --xunit-file={toxinidir}/nosetests.xml     \
-                     --with-coverage3 --cover3-xml              \
-                     --cover3-html-dir={toxinidir}/cover        \
-                     --cover3-xml-file={toxinidir}/coverage.xml
+           nosetests --with-coverage --cover-inclusive --cover-erase []
 
-[testenv:py26]
+[testenv:2.6]
 basepython = python2.6
 deps = -r{toxinidir}/requirements/default.txt
        -r{toxinidir}/requirements/test.txt
        -r{toxinidir}/requirements/test-ci.txt
 commands = {toxinidir}/extra/release/removepyc.sh {toxinidir}
-           pip install anyjson
-           nosetests -v --with-xunit                            \
-                     --xunit-file={toxinidir}/nosetests.xml     \
-                     --with-coverage3 --cover3-xml              \
-                     --cover3-html-dir={toxinidir}/cover        \
-                     --cover3-xml-file={toxinidir}/coverage.xml
+           nosetests --with-coverage --cover-inclusive --cover-erase []
 
 [testenv:pypy]
 basepython = pypy
@@ -48,9 +39,4 @@ deps = -r{toxinidir}/requirements/default.txt
        -r{toxinidir}/requirements/test.txt
        -r{toxinidir}/requirements/test-ci.txt
 commands = {toxinidir}/extra/release/removepyc.sh {toxinidir}
-           pip install anyjson
-           nosetests -v --with-xunit                            \
-                     --xunit-file={toxinidir}/nosetests.xml     \
-                     --with-coverage3 --cover3-xml              \
-                     --cover3-html-dir={toxinidir}/cover        \
-                     --cover3-xml-file={toxinidir}/coverage.xml
+           nosetests --with-coverage --cover-inclusive --cover-erase []