coverage report stage will now fail immediatelly

This commit is contained in:
Jonas Depoix 2024-11-11 15:57:34 +01:00
parent 93fe4323f5
commit d631ceb03c
2 changed files with 14 additions and 2 deletions

View File

@ -62,10 +62,21 @@ jobs:
with:
parallel-finished: true
carryforward: "run-python-3.8,run-python-3.9,run-python-3.10,run-python-3.11,run-python-3.12,run-python-3.13"
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install poetry poethepoet
poetry install --only test
- name: Check coverage
run: poe coverage-report
publish:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
needs: report-coverage
needs: [report-coverage, static-checks]
runs-on: ubuntu-latest
steps:

View File

@ -40,7 +40,8 @@ youtube_transcript_api = "youtube_transcript_api.__main__:main"
[tool.poe.tasks]
test = "pytest youtube_transcript_api"
ci-test.shell = "coverage run -m unittest discover && coverage xml"
coverage.shell = "coverage run -m unittest discover && coverage report -m"
coverage.shell = "coverage run -m unittest discover && coverage report -m --fail-under=100"
coverage-report = "coverage report -m --fail-under=100"
format = "ruff format youtube_transcript_api"
ci-format = "ruff format youtube_transcript_api --check"
lint = "ruff check youtube_transcript_api"