diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..b15cde9 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,3 @@ +[run] +branch = true +source = wakeonlan diff --git a/.gitignore b/.gitignore index 98e343a..d515933 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.pyc *.egg-info/ /.cache/ +/.coverage /.tox/ /build/ /dist/ diff --git a/.travis.yml b/.travis.yml index 55ed967..4afb314 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,10 @@ language: python python: - '3.6' -install: pip install tox +install: pip install codecov tox script: tox +after_success: +- covecov deploy: provider: pypi distributions: sdist bdist_wheel diff --git a/README.rst b/README.rst index 71708d4..f17acb6 100644 --- a/README.rst +++ b/README.rst @@ -13,6 +13,10 @@ wakeonlan :target: https://pywakeonlan.readthedocs.io/en/latest :alt: Documentation Status +.. image:: https://codecov.io/gh/remcohaszing/pywakeonlan/branch/master/graph/badge.svg + :target: https://codecov.io/gh/remcohaszing/pywakeonlan + :alt: Code coverage + A small python module for wake on lan. It has been tested both locally and externally using Python 2.7.3 and Python 3.2.3. diff --git a/dev-requirements.txt b/dev-requirements.txt index 85caf23..863c9dc 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,2 +1,3 @@ mock ~= 2.0.0 pytest ~= 3.4.0 +pytest-cov ~= 2.5.1