Configure CI with tox and coverage

master
Viktor Villainov 2019-01-01 07:00:18 -05:00
parent f5a0522128
commit edaa82622b
No known key found for this signature in database
GPG Key ID: 8EB38B46F33BAF2F
3 changed files with 29 additions and 8 deletions

3
.coveragerc 100644
View File

@ -0,0 +1,3 @@
[report]
exclude_lines =
if __name__ == .__main__.:

View File

@ -3,10 +3,16 @@ language: python
sudo: required sudo: required
dist: xenial dist: xenial
python: matrix:
- "3.5" include:
- "3.6" - python: 3.7
- "3.7" env: TOXENV=py,codecov
- python: 3.6
env: TOXENV=py,codecov
- python: 3.5
env: TOXENV=py,codecov
install: pip install -e . install:
script: python -m unittest - pip install tox
script: tox

16
tox.ini
View File

@ -1,6 +1,18 @@
[tox] [tox]
envlist = py36, py37 envlist = py35, py36, py37
[testenv] [testenv]
deps =
coverage
commands = commands =
python -m unittest coverage run --include=i2plib/* -m unittest
[testenv:codecov]
passenv = CI TRAVIS TRAVIS_*
deps = codecov
skip_install = true
commands =
coverage combine
coverage report
codecov