Skip to content

Commit

Permalink
coveralls ci, badge in readme. resolves #308
Browse files Browse the repository at this point in the history
this squashes the several trial and error attempts to get the integration
running from the coveralls-ci branch into a single commit, as that stuff
is mostly rdflib unrelated.
  • Loading branch information
joernhees committed Jun 23, 2013
1 parent 682d816 commit abf07ed
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 4 deletions.
35 changes: 35 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# .coveragerc to control coverage.py
[run]
branch = True
#source = rdflib,build/src/rdflib # specified in .travis.yml for different envs
omit = */site-packages/*

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
#def __repr__
#if self\.debug

# Don't complain if tests don't hit defensive assertion code:
#raise AssertionError
#raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

# path mappings for the py3 environments (doesn't seem to work on coveralls yet)
[paths]
source =
rdflib/
build/src/rdflib/
tests =
test/
build/src/test/
examples =
examples/
build/src/examples/
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ language: python
branches:
only:
- master
- coveralls-ci

python:
- 2.5
Expand All @@ -21,6 +20,7 @@ install:
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '2' ]]; then pip install --use-mirrors --default-timeout 60 -r requirements.py2.txt; pip install --use-mirrors --default-timeout 60 "html5lib";fi
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '3' ]]; then pip install --use-mirrors --default-timeout 60 -r requirements.py3.txt; fi
- if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then pip install --upgrade "https://bitbucket.org/gjhiggins/isodate/downloads/isodate-0.4.8.tar.gz"; pip install --use-mirrors --default-timeout 60 "elementtree"; fi
- if [[ $TRAVIS_PYTHON_VERSION != '2.5' ]]; then pip install --use-mirrors --default-timeout 60 coverage coveralls && export HAS_COVERALLS=1; fi
- python setup.py install

before_script:
Expand All @@ -30,8 +30,12 @@ script:
# Must run the tests in build/src so python3 doesn't get confused and run
# the python2 code from the current directory instead of the installed
# 2to3 version in build/src.
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '2' ]]; then nosetests; fi
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '3' ]]; then nosetests --where=./build/src; fi
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '2' ]]; then nosetests --with-coverage --cover-tests --cover-package=rdflib ; fi
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '3' ]]; then nosetests --with-coverage --cover-tests --cover-package=build/src/rdflib --where=./build/src; fi

after_success:
- if [[ $HAS_COVERALLS ]] ; then coveralls ; fi

# notifications:
# irc:
# channels: "irc.freenode.org#rdflib"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ More information is available on the project webpage:

https://github.com/RDFLib/rdflib/

Continuous integration status details available from travis.ci:
Continuous integration status details available from travis.ci, test coverage from coveralls:

[![Build Status](https://travis-ci.org/RDFLib/rdflib.png?branch=master)](https://travis-ci.org/RDFLib/rdflib)
[![Coverage Status](https://coveralls.io/repos/RDFLib/rdflib/badge.png?branch=master)](https://coveralls.io/r/RDFLib/rdflib?branch=master)

The documentation can be built by doing::

Expand Down

0 comments on commit abf07ed

Please sign in to comment.