mirror of
https://github.com/laurentS/slowapi.git
synced 2026-03-13 09:10:20 +08:00
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:
8
.github/workflows/python-package.yml
vendored
8
.github/workflows/python-package.yml
vendored
@@ -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
|
||||
Reference in New Issue
Block a user