From 3e1c23809f963b3befe6b2641b58e09d3f1a3f12 Mon Sep 17 00:00:00 2001 From: willtyler Date: Thu, 15 Aug 2024 14:36:02 +0000 Subject: [PATCH] Add pytest coverage --- .github/workflows/ci.yml | 2 +- pyproject.toml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 864481f..d7e6e1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,7 +72,7 @@ jobs: - name: Install python dependencies run: | python -m pip install --upgrade pip - python -m pip install numpy pytest + python -m pip install numpy pytest pytest_cov - name: Build module with coverage run: | # Build the extension module in-place so pytest can find it diff --git a/pyproject.toml b/pyproject.toml index 7c88332..d564e26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,7 @@ dev = [ "bio2zarr @ git+https://github.com/sgkit-dev/bio2zarr.git", "cyvcf2", "pytest", + "pytest-cov", "pytest-datadir", ] @@ -36,6 +37,7 @@ packages = ["vcztools"] [tool.pytest.ini_options] testpaths = ["tests"] +addopts = "--cov=vcztools --cov-report=term-missing" [tool.setuptools_scm] write_to = "vcztools/_version.py"