Confusing (outdated?) documentation (--cov flag)
drernie opened this issue · comments
You can create a coverage report using python:
pytest $ pytest --cov-report xml:path/to/coverage.xml
coverage $ coverage xml path/to/coverage.xml
First of all, it wasn't clear to me whether I needed BOTH of those, or just one.
Secondly, the given pytest command did not work for me. I had to add '--cov':
poetry run pytest --cov --cov-report xml:coverage.xml
Can you clarify?
I personally would have found it incredibly helpful to have a complete example like this (assuming it is correct)
- name: Test with pytest
run: |
poetry run pytest --cov --cov-report xml:coverage.xml
- name: Get Coverage Report
uses: orgoro/coverage@v3
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
thresholdAll: 0.8
thresholdNew: 0.8
thresholdModified: 0.8
But thanks for making this Action, it is awesome!
there are a lot of ways to produce a coverage report.
I will review the docs & find a way to include a more concrete example
Thanks. FYI, the above did work. Also, is there a list of 'threshold' flags anywhere official?
it's in the readme
thresholdAll | ✅ | the minimal average line coverage | 0.8
thresholdNew | ✅ | the minimal average new files line coverage | 0.9
thresholdModified | ✅ | the minimal average modified files line coverage | 0.0