clan-cli: hint on how to get coverage html
Some checks failed
build / test (push) Failing after 13s

This commit is contained in:
DavHau 2023-07-25 00:59:51 +02:00
parent c354157bd5
commit 202e07d5fe
3 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View File

@ -7,5 +7,6 @@ __pycache__
.mypy_cache .mypy_cache
.pytest_cache .pytest_cache
.pythonenv .pythonenv
.reports
.ruff_cache .ruff_cache
htmlcov htmlcov

View File

@ -66,7 +66,8 @@ let
cp -r ${src} ./src cp -r ${src} ./src
chmod +w -R ./src chmod +w -R ./src
cd src cd src
${checkPython}/bin/python -m pytest ./tests ${checkPython}/bin/python -m pytest ./tests \
|| echo -e "generate coverage report py running:\n pytest; firefox .reports/html/index.html"
touch $out touch $out
''; '';

View File

@ -9,7 +9,7 @@ dynamic = ["version"]
scripts = {clan = "clan_cli:main"} scripts = {clan = "clan_cli:main"}
[tool.pytest.ini_options] [tool.pytest.ini_options]
addopts = "--cov . --cov-report term --cov-fail-under=100 --no-cov-on-fail" addopts = "--cov . --cov-report term --cov-report html:.reports/html --cov-fail-under=100 --no-cov-on-fail"
[tool.mypy] [tool.mypy]
python_version = "3.10" python_version = "3.10"