🐍 parse and publish coverage xml to a PR, enforce coverage rate on new & modified files
Create a new workflow .yml file in the .github/workflows/ directory.
You can create a coverage report using $ pytest --cov-report xml:path/to/coverage.xml
name: 'coverage'on:
pull_request:
branches:
- master
- mainjobs:
coverage:
runs-on: ubuntu-lateststeps:
- name: Python Cov uses: orgoro/coverage/vwith:
coverageFile: path/to/coverage.xmltoken: ${{ secrets.GITHUB_TOKEN }}| Input | Optional | Description | Example |
|---|---|---|---|
coverageFile | path to python .xml coverage report | ./path/to/coverage.xml | |
token | your github token | 🤫 | |
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 |
