Skip to content

Commit

Permalink
coverage report stage will now fail immediatelly
Browse files Browse the repository at this point in the history
  • Loading branch information
jdepoix committed Nov 11, 2024
1 parent 93fe432 commit d631ceb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d631ceb

Please sign in to comment.