diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e80d980..bbfe110 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/pyproject.toml b/pyproject.toml index ba5397b..f410135 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"