diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 403c5a3f4..cd762cf11 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,4 +25,9 @@ jobs: python -m pip install -e .[dev] - name: Test with pytest run: | - python -m pytest -v + python -m pytest --cov -v + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: python-rope/rope diff --git a/README.rst b/README.rst index 52d229431..768077e2a 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ rope -- the world's most advanced open source Python refactoring library ========================================================================= -|Build status badge| |Latest version badge| |Download count badge| |ReadTheDocs status badge| +|Build status badge| |Latest version badge| |Download count badge| |ReadTheDocs status badge| |Codecov badge| .. |Build status badge| image:: https://github.com/python-rope/rope/actions/workflows/main.yml/badge.svg :target: https://github.com/python-rope/rope/actions/workflows/main.yml @@ -23,6 +23,10 @@ :target: https://rope.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status +.. |Codecov badge| image:: https://codecov.io/gh/python-rope/rope/graph/badge.svg?token=pU08MBXFIS + :target: https://codecov.io/gh/python-rope/rope + :alt: Codecov + Overview ======== diff --git a/pyproject.toml b/pyproject.toml index 276938f34..398fcb142 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,7 @@ doc = [ ] dev = [ 'pytest>=7.0.1', + 'pytest-cov>=4.1.0', 'pytest-timeout>=2.1.0', 'build>=0.7.0', 'pre-commit>=2.20.0',