Refactoring, test coverage increased to 60% (#1943)

This commit is contained in:
Soxoj
2024-12-08 02:13:28 +01:00
committed by GitHub
parent 4b1317789d
commit c66d776f8a
19 changed files with 326 additions and 226 deletions
+11 -3
View File
@@ -16,7 +16,8 @@ jobs:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
@@ -26,6 +27,13 @@ jobs:
python -m pip install --upgrade pip
python -m pip install poetry
python -m poetry install --with dev
- name: Test with pytest
- name: Test with Coverage and Pytest (Fail if coverage is low)
run: |
poetry run pytest --reruns 3 --reruns-delay 5
poetry run coverage run --source=./maigret -m pytest --reruns 3 --reruns-delay 5 tests
poetry run coverage report --fail-under=60
poetry run coverage html
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: htmlcov
path: htmlcov