File tree Expand file tree Collapse file tree 4 files changed +182
-145
lines changed Expand file tree Collapse file tree 4 files changed +182
-145
lines changed Original file line number Diff line number Diff line change 27
27
poetry env use "3.12"
28
28
poetry install
29
29
- name : Setup reviewdog
30
- uses : reviewdog/action-setup@v1
30
+ uses : reviewdog/action-setup@e04ffabe3898a0af8d0fb1af00c188831c4b5893
31
31
- name : Run black
32
32
env :
33
33
REVIEWDOG_GITHUB_API_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43
43
poetry run ruff check nodestream_github tests --output-format rdjson | reviewdog -f=rdjson -name="ruff-check" -level=warning -reporter=github-pr-review
44
44
- name : Run Tests
45
45
run : |
46
- poetry run pytest
46
+ poetry run pytest --cov-report=html --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=nodestream_github tests/ | tee pytest-coverage.txt
47
+ - uses : actions/upload-artifact@v4
48
+ with :
49
+ name : coverage-info
50
+ path : htmlcov/
51
+ - name : Pytest coverage comment
52
+ id : coverageComment
53
+ uses : MishaKav/pytest-coverage-comment@v1
54
+ with :
55
+ pytest-coverage-path : ./pytest-coverage.txt
56
+ junitxml-path : ./pytest.xml
57
+ - name : fail on test errors
58
+ if : ${{ steps.coverageComment.outputs.errors > 0 || steps.coverageComment.outputs.failures > 0 }}
59
+ uses : actions/github-script@v3
60
+ with :
61
+ script : |
62
+ core.setFailed('Pytest Failures or Errors')
Original file line number Diff line number Diff line change @@ -161,3 +161,5 @@ cython_debug/
161
161
** /coverage.json
162
162
** /coverage.xml
163
163
** /htmlcov /*
164
+ pytest-coverage.txt
165
+ pytest.xml
You can’t perform that action at this time.
0 commit comments