using codecov and coverage tool

This commit is contained in:
Prodesire 2018-01-04 22:34:24 +08:00
parent 0ab334740a
commit 1c39c6bfe8
5 changed files with 18 additions and 11 deletions

View File

@ -21,16 +21,14 @@ environment:
PYTHON_VERSION: "3.6.x"
PYTHON_ARCH: "64"
TOXENV: "py36"
COVERALLS_REPO_TOKEN:
secure: dKqk1ANtaVDw/njiGRw+qYq3tWywjoZDs3duK2VaNRF0AAAnSBK5RGbvKSTpl/Xk
install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
- "pip install --disable-pip-version-check --user --upgrade pip"
- "%CMD_IN_ENV% pip install tox coverage coveralls"
- "%CMD_IN_ENV% pip install tox"
test_script:
# Run the project tests
- "%CMD_IN_ENV% tox"
on_success:
- "%CMD_IN_ENV% codecov"

8
.coveragerc Normal file
View File

@ -0,0 +1,8 @@
[run]
branch = True
source = pydu
[paths]
source =
pydu
.tox/*/lib/python*/site-packages/pydu

View File

@ -10,11 +10,14 @@ sudo: false
cache: pip
install:
- pip install tox-travis
- pip install tox
script:
- tox
after_success:
- codecov
notifications:
email:
recipients:

View File

@ -1,4 +1,4 @@
pytest>=2.8.0
pytest-xdist
coveralls
codecov
HTTPretty==0.8.14

View File

@ -2,8 +2,6 @@
envlist = py27,py34,py35,py36
[testenv]
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
deps=-rrequirements-dev.txt
commands=
coverage run --source=pydu -m pytest tests
coveralls
python setup.py test