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
dist: xenial
python:
- "3.5"
- "3.6"
- "3.7"
matrix:
include:
- python: 3.7
env: TOXENV=py,codecov
- python: 3.6
env: TOXENV=py,codecov
- python: 3.5
env: TOXENV=py,codecov
install: pip install -e .
script: python -m unittest
install:
- pip install tox
script: tox

16
tox.ini
View File

@ -1,6 +1,18 @@
[tox]
envlist = py36, py37
envlist = py35, py36, py37
[testenv]
deps =
coverage
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