Skip to content

Commit 14c8eb0

Browse files
authored
ci: turn on coverage checks at 95% (#44)
1 parent d5b37bc commit 14c8eb0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/pr.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@ jobs:
2424
python -m pip install --upgrade pip
2525
python -m pip install hatch
2626
- name: Pytest
27-
run: hatch run +py=${{ matrix.python-version }} test:test
27+
run: hatch run +py=${{ matrix.python-version }} test:test-cov
28+
- name: Coverage report
29+
run: hatch run +py=${{ matrix.python-version }} test:cov-report

pyproject.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ dependencies = [
4545

4646
[tool.hatch.envs.default.scripts]
4747
test = "pytest {args}"
48-
test-cov = "test --cov-report=term-missing --cov-config=pyproject.toml --cov=asdf_pydantic --cov=tests {args}"
48+
test-cov = "test --cov-report= --cov-config=pyproject.toml --cov=asdf_pydantic --cov=tests {args}"
49+
cov-report = "coverage report {args}"
4950

5051
[tool.hatch.envs.test]
5152
template = "default"
@@ -86,6 +87,8 @@ omit = ["asdf_pydantic/__version__.py"]
8687

8788
[tool.coverage.report]
8889
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
90+
precision = 1
91+
fail_under = 95
8992

9093
[tool.ruff.pydocstyle]
9194
convention = "google"

0 commit comments

Comments
 (0)