Skip to content

Refactoring, test coverage increased to 60% #2

Refactoring, test coverage increased to 60%

Refactoring, test coverage increased to 60% #2

Workflow file for this run

name: Coverage Test (60% minimum)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
python -m poetry install --with dev
- name: Test with Coverage and Pytest (Fail if coverage is low)
run: |
poetry run coverage run --source=./maigret -m pytest tests
# Fail if coverage is less than 60%
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