Skip to content

Commit

Permalink
Add test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
epicserve committed Oct 19, 2024
1 parent b4b7d2a commit 450b36c
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
run: uv python install ${{ matrix.python-version }}

- name: Run tests
run: uv run --python ${{ matrix.python-version }} pytest
run: uv run --python ${{ matrix.python-version }} pytest --cov --cov-config=pyproject.toml
4 changes: 4 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ format: format_just format_python
@test:
uv run pytest

@test_with_coverage:
uv run pytest --cov --cov-config=pyproject.toml --cov-report=html
open htmlcov/index.html

@update_templates:
uv run python scripts/update_templates.py
just _success "Templates updated."
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ build-backend = "hatchling.build"

[tool.uv]
dev-dependencies = [
"pytest-cov>=5.0.0",
"pytest>=8.3.3",
"ruff-lsp>=0.0.57",
"ruff>=0.6.9",
Expand Down Expand Up @@ -50,3 +51,6 @@ section-order = ["future", "standard-library", "third-party", "first-party", "lo

[tool.ruff.lint.per-file-ignores]
"**/{tests}/*" = ["S101"]

[tool.coverage.run]
source = ["src/"]
79 changes: 79 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 450b36c

Please sign in to comment.