Make code example from README.md runnable #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: coverage | |
# only check for coverage on PRs | |
on: [pull_request] | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install python 3.7 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Test coverage with pytest | |
run: | | |
pytest -v --cov-fail-under=100 --cov-report "xml:coverage.xml" | |
- name: Pytest coverage comment | |
uses: MishaKav/pytest-coverage-comment@main | |
with: | |
pytest-xml-coverage-path: ./coverage.xml |