diff --git a/.travis.yml b/.travis.yml index 23586663..893e33bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,7 +53,12 @@ jobs: - env: TOXENV=py38-djmaster install: + - pip install -U pip - pip install tox script: - - tox \ No newline at end of file + - tox + +after_success: + - pip install codecov + - codecov -e TOXENV diff --git a/README.rst b/README.rst index 3273f40d..63b2fe19 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ drf-spectacular =============== -|build-status-image| |pypi-version| +|build-status-image| |codecov| |pypi-version| Sane and flexible `OpenAPI 3 `_ schema generation for `Django REST framework `_. @@ -221,3 +221,5 @@ globally, and then simply run: :target: https://travis-ci.org/tfranzel/drf-spectacular?branch=master .. |pypi-version| image:: https://img.shields.io/pypi/v/drf-spectacular.svg :target: https://pypi.python.org/pypi/drf-spectacular +.. |codecov| image:: https://codecov.io/gh/tfranzel/drf-spectacular/branch/master/graph/badge.svg + :target: https://codecov.io/gh/tfranzel/drf-spectacular diff --git a/tox.ini b/tox.ini index f82d60a9..f2433157 100644 --- a/tox.ini +++ b/tox.ini @@ -6,11 +6,11 @@ envlist = skip_missing_interpreters = true [testenv] -commands = ./runtests.py --fast +commands = ./runtests.py --fast --cov=drf_spectacular --cov=tests setenv = PYTHONDONTWRITEBYTECODE=1 passenv = - TRAVIS + CI TRAVIS TRAVIS_* deps = django2.2: Django==2.2 django3.0: Django==3.0