feature(coverage): Add Python test coverage

Add test coverage via `coverage` package.
Update workflow to run pytest via coverage and output coverage report.
Drops Python 3.6 - which is also an open issue and coverage required
dropping 3.6

Closes #82 #83
This commit is contained in:
Karl Newell
2022-02-01 09:12:53 -07:00
parent e83c0edf2a
commit 47fccea044
4 changed files with 65 additions and 16 deletions

View File

@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
@@ -41,5 +41,9 @@ jobs:
run: |
poetry run mypy .
- name: Test with pytest
# Wrapped by coverage to generate coverage data
run: |
poetry run pytest
poetry run coverage run --omit="tests*" -m pytest
- name: Generate coverage report
run: |
poetry run coverage report