From 74b197bc2c4cfe9ac0f1b1a20227c47a42659225 Mon Sep 17 00:00:00 2001 From: Rohan Mehta Date: Tue, 18 Mar 2025 16:46:32 -0400 Subject: [PATCH] Add min 95% code coverage --- .github/workflows/tests.yml | 4 ++-- Makefile | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6dce5c81..c9a56e88 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -50,8 +50,8 @@ jobs: enable-cache: true - name: Install dependencies run: make sync - - name: Run tests - run: make tests + - name: Run tests with coverage + run: make coverage build-docs: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 39899d81..16ed5fe5 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,13 @@ mypy: tests: uv run pytest +.PHONY: coverage +coverage: + + uv run coverage run -m pytest + uv run coverage xml -o coverage.xml + uv run coverage report -m --fail-under=95 + .PHONY: snapshots-fix snapshots-fix: uv run pytest --inline-snapshot=fix @@ -42,4 +49,6 @@ serve-docs: .PHONY: deploy-docs deploy-docs: uv run mkdocs gh-deploy --force --verbose + +