Skip to content

Commit 47ffce5

Browse files
committed
fix coverage for package
1 parent e83ec7f commit 47ffce5

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/workflows/ci-core.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ jobs:
3131
run: uv build && uv run twine check dist/*
3232
- name: Run tests
3333
run: make core/tests
34-
- name: Rename coverage file
35-
run: mv .coverage .coverage.${{ matrix.python-version}}
3634
- name: "Save coverage artifact"
3735
uses: actions/upload-artifact@v4
3836
with:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ build: ## Build the python package
2020

2121
tests: ${TESTS} ## Run tests for each package
2222
${TESTS}: %/tests:
23-
uv run pytest -v --cov=testcontainers.$* $*/tests
23+
uv run coverage run --parallel -m pytest -v $*/tests
2424

2525
coverage: ## Target to combine and report coverage.
2626
uv run coverage combine

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ filterwarnings = [
285285
]
286286

287287
[tool.coverage.run]
288+
relative_files = true
289+
source = ["testcontainers.core"] # we only check coverage for core atm
288290
branch = true
289291
omit = ["oracle.py"]
290292

@@ -294,6 +296,13 @@ exclude_lines = [
294296
"raise NotImplementedError",
295297
]
296298

299+
[tool.coverage.paths]
300+
source = [
301+
"core/testcontainers",
302+
"*/site-packages/testcontainers",
303+
"*/dist-packages/testcontainers",
304+
]
305+
297306
[tool.ruff]
298307
target-version = "py39"
299308
line-length = 120

0 commit comments

Comments
 (0)