configure coverage testing and reports
This commit is contained in:
parent
6c6ca0e997
commit
a9bf9d0628
3 changed files with 14 additions and 1 deletions
|
|
@ -26,3 +26,4 @@ steps:
|
||||||
# image: docker.io/astral/uv:python${PYTHON_VERSION}-trixie-slim
|
# image: docker.io/astral/uv:python${PYTHON_VERSION}-trixie-slim
|
||||||
# commands:
|
# commands:
|
||||||
# - uv run pytest tests.py
|
# - uv run pytest tests.py
|
||||||
|
# coverage: uv run pytest tests.py --cov-report= --cov=src # no cov report on terminal: useful for CI
|
||||||
|
|
|
||||||
6
justfile
6
justfile
|
|
@ -3,6 +3,12 @@ exports-deps:
|
||||||
uv export {{ uv_export_options }} --output-file requirements.txt
|
uv export {{ uv_export_options }} --output-file requirements.txt
|
||||||
uv export {{ uv_export_options }} --only-dev --output-file requirements.dev.txt
|
uv export {{ uv_export_options }} --only-dev --output-file requirements.dev.txt
|
||||||
|
|
||||||
|
test:
|
||||||
|
uv run pytest tests.py
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
uv run pytest tests.py --cov=src/ --cov-report term --cov-report xml --cov-report html --cov-config pyproject.toml
|
||||||
|
|
||||||
lint-python:
|
lint-python:
|
||||||
uv run ruff check .
|
uv run ruff check .
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
name = "teilchensammler-cli"
|
name = "teilchensammler-cli"
|
||||||
description = "Build up and maintain an inventory of electronics parts and tools."
|
description = "Build up and maintain an inventory of electronics parts and tools."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12,<4.0"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
authors = [{ name = "bronsen", email = "kontakt+teilchensammler@nrrd.de" }]
|
authors = [{ name = "bronsen", email = "kontakt+teilchensammler@nrrd.de" }]
|
||||||
keywords = [
|
keywords = [
|
||||||
|
|
@ -51,6 +51,7 @@ teilchensammler-cli = "teilchensammler_cli:main"
|
||||||
dev = [
|
dev = [
|
||||||
"pytest>=9.0.1",
|
"pytest>=9.0.1",
|
||||||
"pytest-asyncio>=1.3.0",
|
"pytest-asyncio>=1.3.0",
|
||||||
|
"pytest-cov>=7.0.0",
|
||||||
"pytest-textual-snapshot>=1.0.0",
|
"pytest-textual-snapshot>=1.0.0",
|
||||||
"ruff>=0.14.8",
|
"ruff>=0.14.8",
|
||||||
]
|
]
|
||||||
|
|
@ -59,6 +60,11 @@ dev = [
|
||||||
requires = ["hatch-vcs", "hatchling"]
|
requires = ["hatch-vcs", "hatchling"]
|
||||||
build-backend = "hatchling.build"
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
|
[tool.coverage.run]
|
||||||
|
branch = true
|
||||||
|
omit = ["tests.py"]
|
||||||
|
source_dirs = ["src/"]
|
||||||
|
|
||||||
[tool.hatch.version]
|
[tool.hatch.version]
|
||||||
source = "vcs"
|
source = "vcs"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue