Skip to content

Commit 308a01c

Browse files
committed
Add coverage comment in ci
1 parent 4a85f65 commit 308a01c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,10 @@ jobs:
7272
run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV
7373

7474
- name: Run tests
75-
run: pdm run pytest tests --cov=asgi_monitor --cov-append --cov-report term-missing -v
75+
run: pdm run pytest tests --cov=asgi_monitor --junitxml=pytest.xml | tee pytest-coverage.txt; exit ${PIPESTATUS[0]}
76+
77+
- name: Test coverage comment
78+
uses: MishaKav/pytest-coverage-comment@main
79+
with:
80+
pytest-coverage-path: ./pytest-coverage.txt
81+
junitxml-path: ./pytest.xml

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ htmlcov/
3535
.cache
3636
nosetests.xml
3737
coverage.xml
38+
pytest.xml
39+
pytest-coverage.txt
3840
*.cover
3941
*.py,cover
4042
.hypothesis/

0 commit comments

Comments
 (0)