Skip to content

Commit ff65fb4

Browse files
authored
Add min 95% code coverage (#229)
Run the tests with `coverage`, and make sure the min coverage is 95%.
2 parents 3b2afe1 + 74b197b commit ff65fb4

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050
enable-cache: true
5151
- name: Install dependencies
5252
run: make sync
53-
- name: Run tests
54-
run: make tests
53+
- name: Run tests with coverage
54+
run: make coverage
5555

5656
build-docs:
5757
runs-on: ubuntu-latest

Makefile

+9
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ mypy:
1818
tests:
1919
uv run pytest
2020

21+
.PHONY: coverage
22+
coverage:
23+
24+
uv run coverage run -m pytest
25+
uv run coverage xml -o coverage.xml
26+
uv run coverage report -m --fail-under=95
27+
2128
.PHONY: snapshots-fix
2229
snapshots-fix:
2330
uv run pytest --inline-snapshot=fix
@@ -42,4 +49,6 @@ serve-docs:
4249
.PHONY: deploy-docs
4350
deploy-docs:
4451
uv run mkdocs gh-deploy --force --verbose
52+
53+
4554

0 commit comments

Comments
 (0)