added coveralls integration

This commit is contained in:
Jonas Depoix 2024-11-11 12:04:38 +01:00
parent 3f5c0bcfec
commit e5bd9ae825
3 changed files with 23 additions and 39 deletions

View File

@ -24,12 +24,12 @@ jobs:
- name: Lint - name: Lint
run: poe lint run: poe lint
test-coverage: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -44,3 +44,20 @@ jobs:
- name: Run tests - name: Run tests
run: | run: |
poe ci-test poe ci-test
- name: Report intermediate coverage report
uses: coverallsapp/github-action@v2
with:
flag-name: run-python-${{ matrix.python-version }}
parallel: true
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Finalize coverage report
uses: coverallsapp/github-action@v2
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,run-python-3.14"

36
poetry.lock generated
View File

@ -217,41 +217,9 @@ files = [
{file = "coverage-7.6.1.tar.gz", hash = "sha256:953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d"}, {file = "coverage-7.6.1.tar.gz", hash = "sha256:953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d"},
] ]
[package.dependencies]
tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""}
[package.extras] [package.extras]
toml = ["tomli"] toml = ["tomli"]
[[package]]
name = "coveralls"
version = "4.0.1"
description = "Show coverage stats online via coveralls.io"
optional = false
python-versions = "<3.13,>=3.8"
files = [
{file = "coveralls-4.0.1-py3-none-any.whl", hash = "sha256:7a6b1fa9848332c7b2221afb20f3df90272ac0167060f41b5fe90429b30b1809"},
{file = "coveralls-4.0.1.tar.gz", hash = "sha256:7b2a0a2bcef94f295e3cf28dcc55ca40b71c77d1c2446b538e85f0f7bc21aa69"},
]
[package.dependencies]
coverage = {version = ">=5.0,<6.0.dev0 || >6.1,<6.1.1 || >6.1.1,<8.0", extras = ["toml"]}
docopt = ">=0.6.1,<0.7.0"
requests = ">=1.0.0,<3.0.0"
[package.extras]
yaml = ["pyyaml (>=3.10,<7.0)"]
[[package]]
name = "docopt"
version = "0.6.2"
description = "Pythonic argument parser, that will make you smile"
optional = false
python-versions = "*"
files = [
{file = "docopt-0.6.2.tar.gz", hash = "sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"},
]
[[package]] [[package]]
name = "exceptiongroup" name = "exceptiongroup"
version = "1.2.2" version = "1.2.2"
@ -443,5 +411,5 @@ zstd = ["zstandard (>=0.18.0)"]
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = ">=3.8,<3.13" python-versions = ">=3.8,<=3.14"
content-hash = "ef642ce9df6240dee52ca62d50fcb18bf0e99a717067a45a101fdf888e06458c" content-hash = "1fc5fdbba555a4380ff80fda6988a95ecbaa342ca863cf19f8fc8e3df0430ff7"

View File

@ -39,14 +39,14 @@ youtube_transcript_api = "youtube_transcript_api.__main__:main"
[tool.poe.tasks] [tool.poe.tasks]
test = "pytest youtube_transcript_api" test = "pytest youtube_transcript_api"
ci-test.shell = "coverage run -m unittest discover && coverage report -m --fail-under=100" ci-test.shell = "coverage run -m unittest discover"
coverage.shell = "coverage run -m unittest discover && coverage report -m" coverage.shell = "coverage run -m unittest discover && coverage report -m"
format = "ruff format youtube_transcript_api" format = "ruff format youtube_transcript_api"
ci-format = "ruff format youtube_transcript_api --check" ci-format = "ruff format youtube_transcript_api --check"
lint = "ruff check youtube_transcript_api" lint = "ruff check youtube_transcript_api"
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = ">=3.8,<3.13" python = ">=3.8,<=3.14"
requests = "*" requests = "*"
[tool.poetry.group.test] [tool.poetry.group.test]
@ -57,7 +57,6 @@ pytest = "^8.3.3"
coverage = "^7.6.1" coverage = "^7.6.1"
mock = "^5.1.0" mock = "^5.1.0"
httpretty = "^1.1.4" httpretty = "^1.1.4"
coveralls = "^4.0.1"
[tool.poetry.group.dev] [tool.poetry.group.dev]
optional = true optional = true