diff --git a/README.md b/README.md index 2a98e28..d99486f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![Coverage](https://img.shields.io/badge/coverage-30%25%2B-brightgreen) + ### ONE FM LMS `one_lms` extends Frappe LMS for ONE FM training operations. It adds custom fields, diff --git a/pyproject.toml b/pyproject.toml index 9892080..aec5044 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,7 @@ dependencies = [ [project.optional-dependencies] dev = [ + "pytest-cov~=5.0.0", "basedmypy~=2.0.0", ] @@ -60,6 +61,17 @@ quote-style = "double" indent-style = "tab" docstring-code-format = true +[tool.pytest.ini_options] +addopts = "--cov=one_lms --cov-report=term-missing --cov-fail-under=30" + +[tool.coverage.run] +source = ["one_lms"] +omit = ["*/tests/*", "*/test_*.py", "*/patches/*"] + +[tool.coverage.report] +fail_under = 30 +show_missing = true + [tool.mypy] strict = false pretty = true