diff --git a/.travis.yml b/.travis.yml index 418ca7a..48a15d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: python install: - - pip install tox + - pip install tox codecov env: - TOX_ENV=pypy @@ -26,3 +26,6 @@ matrix: - python: 3.5 env: - TOX_ENV=flake8 + +after_success: + - coverage combine && codecov \ No newline at end of file diff --git a/Makefile b/Makefile index cb4ab46..4f018c1 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,11 @@ clean: rm -rf build rm -rf dist rm -rf scour.egg-info + rm -rf .tox + rm -f .coverage* + rm -rf htmlcov + find . -name "*.pyc" -type f -exec rm -f {} \; + find . -name "*__pycache__" -type d -prune -exec rm -rf {} \; publish: clean python setup.py register @@ -25,4 +30,9 @@ test_error_on_flowtext: PYTHONPATH=. scour --error-on-flowtext unittests/flowtext.svg /dev/null flake8: - flake8 --max-line-length=119 \ No newline at end of file + flake8 --max-line-length=119 + +coverage: + coverage run --source=scour testscour.py + coverage html + coverage report \ No newline at end of file diff --git a/tox.ini b/tox.ini index 156850d..30dacf8 100644 --- a/tox.ini +++ b/tox.ini @@ -10,9 +10,13 @@ envlist = [testenv] +deps = + six + coverage + commands = scour --version - python testscour.py + coverage run --parallel-mode --source=scour testscour.py [testenv:flake8]