mirror of
https://github.com/dw-0/kiauh.git
synced 2026-08-04 05:17:53 +05:00
chore: add pytest-cov and CI workflow
Add GitHub Actions workflow for running tests with coverage on Python 3.8 and 3.11. Configure pytest-cov, coverage thresholds and expand testpaths in pyproject.toml. Update .gitignore for .ruff_cache, .mypy_cache, *.egg-info and .coverage.
This commit is contained in:
+32
-3
@@ -1,13 +1,19 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=61", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "kiauh"
|
||||
version = "0.0.0"
|
||||
requires-python = ">=3.8"
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev=["ruff", "mypy", "pytest"]
|
||||
dev = ["ruff", "mypy", "pytest", "pytest-cov"]
|
||||
|
||||
[tool.ruff]
|
||||
required-version = ">=0.9.10"
|
||||
respect-gitignore = true
|
||||
exclude = [".git",".github", "./docs"]
|
||||
exclude = [".git", ".github", "./docs"]
|
||||
line-length = 88
|
||||
indent-width = 4
|
||||
output-format = "full"
|
||||
@@ -24,6 +30,8 @@ extend-select = ["I"]
|
||||
[tool.mypy]
|
||||
python_version = "3.8"
|
||||
platform = "linux"
|
||||
explicit_package_bases = true
|
||||
mypy_path = "kiauh"
|
||||
check_untyped_defs = true
|
||||
ignore_missing_imports = true
|
||||
warn_redundant_casts = true
|
||||
@@ -31,7 +39,28 @@ warn_unused_ignores = true
|
||||
warn_return_any = true
|
||||
warn_unreachable = true
|
||||
|
||||
[tool.coverage.report]
|
||||
fail_under = 65
|
||||
skip_covered = false
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
minversion = "8.2.1"
|
||||
testpaths = ["kiauh/core/simple_config_parser/tests", "kiauh/utils/tests"]
|
||||
testpaths = [
|
||||
"kiauh/components/klipper/services/tests",
|
||||
"kiauh/components/moonraker/services/tests",
|
||||
"kiauh/components/moonraker/utils/tests",
|
||||
"kiauh/components/webui_client/services/tests",
|
||||
"kiauh/components/webui_client/tests",
|
||||
"kiauh/components/webui_client/menus/tests",
|
||||
"kiauh/core/backends/tests",
|
||||
"kiauh/core/cli/tests",
|
||||
"kiauh/core/instance_manager/tests",
|
||||
"kiauh/core/menus/tests",
|
||||
"kiauh/core/services/tests",
|
||||
"kiauh/core/settings/tests",
|
||||
"kiauh/core/simple_config_parser/tests",
|
||||
"kiauh/extensions/tests",
|
||||
"kiauh/tests",
|
||||
"kiauh/utils/tests",
|
||||
]
|
||||
pythonpath = ["kiauh"]
|
||||
|
||||
Reference in New Issue
Block a user