Skip to content

Commit 9768723

Browse files
committed
chore: add coverage report as comment
1 parent fa0fb85 commit 9768723

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/python-tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ jobs:
2727
pip install -r dev-requirements.txt
2828
- name: Test with pytest
2929
run: |
30-
pytest
30+
pytest --cov --cov-report=term-missing | tee pytest-coverage.out
31+
- name: Comment on PR with coverage report
32+
uses: marp-team/pytest-cov-comment@v1
33+
with:
34+
pytest_coverage_file: pytest-coverage.out

unix/dev-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,5 @@ wheel==0.38.4
6464
wrapt==1.14.1; python_version < '3.11'
6565
zipp==3.11.0; python_version < '3.10'
6666
pytest
67+
pytest-cov
6768
pytest-mock

0 commit comments

Comments
 (0)