Skip to content

Commit

Permalink
Enables coveralls.io
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreMiras committed Dec 27, 2019
1 parent 5d6317a commit cf61b8c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ python:

install: pip install -U tox-travis

script: tox
script: make test-all

deploy:
provider: pypi
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ PIP=$(VIRTUAL_ENV)/bin/pip
PYTHON_MAJOR_VERSION=3
PYTHON_MINOR_VERSION=7
PYTHON_VERSION=$(PYTHON_MAJOR_VERSION).$(PYTHON_MINOR_VERSION)
PYTHON_MAJOR_MINOR=$(PYTHON_MAJOR_VERSION)$(PYTHON_MINOR_VERSION)
PYTHON_WITH_VERSION=python$(PYTHON_VERSION)
PYTHON=$(VIRTUAL_ENV)/bin/python
FLAKE8=$(VIRTUAL_ENV)/bin/flake8
PYTEST=$(VIRTUAL_ENV)/bin/pytest
# only report coverage for one Python version in tox testing
COVERALLS=.tox/py$(PYTHON_MAJOR_MINOR)/bin/coveralls
COVERAGE=$(VIRTUAL_ENV)/bin/coverage
TWINE=$(VIRTUAL_ENV)/bin/twine
SPHINX_APIDOC=$(VIRTUAL_ENV)/bin/sphinx-apidoc
Expand Down Expand Up @@ -69,10 +72,11 @@ lint: virtualenv ## check style with flake8
$(FLAKE8) eth_accounts tests

test: virtualenv ## run tests quickly with the default Python
$(PYTEST)
$(PYTEST) --cov eth_accounts/ --cov-report html tests/

test-all: ## run tests on every Python version with tox
tox
@if [ -n "$$CI" ] && [ -f $(COVERALLS) ]; then $(COVERALLS); fi \

coverage: virtualenv ## check code coverage quickly with the default Python
$(COVERAGE) run --source eth_accounts -m pytest
Expand Down
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ eth-accounts
.. image:: https://img.shields.io/travis/com/AndreMiras/eth-accounts/develop
:target: https://travis-ci.com/AndreMiras/eth-accounts

.. image:: https://coveralls.io/repos/github/AndreMiras/eth-accounts/badge.svg?branch=develop
:target: https://coveralls.io/github/AndreMiras/eth-accounts?branch=develop

.. image:: https://readthedocs.org/projects/eth-accounts/badge/?version=latest
:target: https://eth-accounts.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
Expand Down
3 changes: 2 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
bump2version==0.5.11
coverage==4.5.4
coveralls
eth-account<0.5.0
eth-utils
flake8==3.7.8
pip==19.2.3
pytest==4.6.5
pytest-cov
pytest-runner==5.1
Sphinx==1.8.5
twine==1.14.0
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ deps =
; -r{toxinidir}/requirements.txt
commands =
pip install -U pip
pytest --basetemp={envtmpdir}

pytest --basetemp={envtmpdir} --cov eth_accounts/ tests/

0 comments on commit cf61b8c

Please sign in to comment.