Skip to content

Commit ca6beee

Browse files
committed
Refactor coverage comment in ci
1 parent 308a01c commit ca6beee

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/ci.yaml

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

7474
- name: Run tests
75-
run: pdm run pytest tests --cov=asgi_monitor --junitxml=pytest.xml | tee pytest-coverage.txt; exit ${PIPESTATUS[0]}
75+
run: pdm run pytest tests --cov=asgi_monitor --junitxml=junitxml.xml --cov-report "xml:coverage.xml"; exit ${PIPESTATUS[0]}
7676

7777
- name: Test coverage comment
7878
uses: MishaKav/pytest-coverage-comment@main
7979
with:
80-
pytest-coverage-path: ./pytest-coverage.txt
81-
junitxml-path: ./pytest.xml
80+
pytest-xml-coverage-path: ./coverage.xml
81+
junitxml-path: ./junitxml.xml
82+
create-new-comment: true

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ htmlcov/
3535
.cache
3636
nosetests.xml
3737
coverage.xml
38-
pytest.xml
39-
pytest-coverage.txt
38+
junitxml.xml
4039
*.cover
4140
*.py,cover
4241
.hypothesis/

0 commit comments

Comments
 (0)