Skip to content

Commit 766389f

Browse files
authored
Merge pull request #782 from python-rope/lieryan-add-codecov
Create code coverage when running pytest in GHA
2 parents 06188c1 + 9026d5b commit 766389f

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,9 @@ jobs:
2525
python -m pip install -e .[dev]
2626
- name: Test with pytest
2727
run: |
28-
python -m pytest -v
28+
python -m pytest --cov -v
29+
- name: Upload coverage reports to Codecov
30+
uses: codecov/[email protected]
31+
with:
32+
token: ${{ secrets.CODECOV_TOKEN }}
33+
slug: python-rope/rope

README.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
rope -- the world's most advanced open source Python refactoring library
77
=========================================================================
88

9-
|Build status badge| |Latest version badge| |Download count badge| |ReadTheDocs status badge|
9+
|Build status badge| |Latest version badge| |Download count badge| |ReadTheDocs status badge| |Codecov badge|
1010

1111
.. |Build status badge| image:: https://github.com/python-rope/rope/actions/workflows/main.yml/badge.svg
1212
:target: https://github.com/python-rope/rope/actions/workflows/main.yml
@@ -23,6 +23,10 @@
2323
:target: https://rope.readthedocs.io/en/latest/?badge=latest
2424
:alt: Documentation Status
2525

26+
.. |Codecov badge| image:: https://codecov.io/gh/python-rope/rope/graph/badge.svg?token=pU08MBXFIS
27+
:target: https://codecov.io/gh/python-rope/rope
28+
:alt: Codecov
29+
2630
Overview
2731
========
2832

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ doc = [
4848
]
4949
dev = [
5050
'pytest>=7.0.1',
51+
'pytest-cov>=4.1.0',
5152
'pytest-timeout>=2.1.0',
5253
'build>=0.7.0',
5354
'pre-commit>=2.20.0',

0 commit comments

Comments
 (0)