Add min 95% code coverage (#229)
Run the tests with `coverage`, and make sure the min coverage is 95%.
This commit is contained in:
commit
ff65fb48dd
2 changed files with 11 additions and 2 deletions
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
|
|
@ -50,8 +50,8 @@ jobs:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: make sync
|
run: make sync
|
||||||
- name: Run tests
|
- name: Run tests with coverage
|
||||||
run: make tests
|
run: make coverage
|
||||||
|
|
||||||
build-docs:
|
build-docs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
9
Makefile
9
Makefile
|
|
@ -18,6 +18,13 @@ mypy:
|
||||||
tests:
|
tests:
|
||||||
uv run pytest
|
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
|
.PHONY: snapshots-fix
|
||||||
snapshots-fix:
|
snapshots-fix:
|
||||||
uv run pytest --inline-snapshot=fix
|
uv run pytest --inline-snapshot=fix
|
||||||
|
|
@ -43,3 +50,5 @@ serve-docs:
|
||||||
deploy-docs:
|
deploy-docs:
|
||||||
uv run mkdocs gh-deploy --force --verbose
|
uv run mkdocs gh-deploy --force --verbose
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue