Skip to content

Commit

Permalink
ci: turn on coverage checks at 95% (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
ketozhang authored Nov 20, 2024
1 parent d5b37bc commit 14c8eb0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ jobs:
python -m pip install --upgrade pip
python -m pip install hatch
- name: Pytest
run: hatch run +py=${{ matrix.python-version }} test:test
run: hatch run +py=${{ matrix.python-version }} test:test-cov
- name: Coverage report
run: hatch run +py=${{ matrix.python-version }} test:cov-report
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ dependencies = [

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

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

[tool.coverage.report]
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
precision = 1
fail_under = 95

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

0 comments on commit 14c8eb0

Please sign in to comment.