diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 73af864..bd79caf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,8 +33,8 @@ jobs: - name: Install package with dev extras run: pip install -e ".[dev]" - - name: Run tests - run: pytest -q + - name: Run tests with coverage + run: pytest -q --cov=conclave --cov-report=term-missing --cov-fail-under=75 lint: name: "ruff" diff --git a/pyproject.toml b/pyproject.toml index 2dbb47d..d5132c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ dependencies = [ dev = [ "pytest>=8.0.0", "pytest-asyncio>=0.23.0", + "pytest-cov>=5.0.0", ] [project.scripts] @@ -37,6 +38,19 @@ asyncio_mode = "auto" testpaths = ["tests"] pythonpath = ["."] +[tool.coverage.run] +source = ["conclave"] +branch = true + +[tool.coverage.report] +fail_under = 75 +show_missing = true +exclude_lines = [ + "pragma: no cover", + "if TYPE_CHECKING:", + "raise NotImplementedError", +] + [tool.ruff] line-length = 100 target-version = "py311"