Exclude non-essential files from coverage report

This commit is contained in:
ChristianZaccaria 2025-07-07 13:52:10 +01:00
parent 24a4a1e167
commit 6daf23a22b
3 changed files with 11 additions and 1 deletions

View file

@ -4,3 +4,8 @@ omit =
*/llama_stack/providers/* */llama_stack/providers/*
*/llama_stack/templates/* */llama_stack/templates/*
.venv/* .venv/*
*/llama_stack/cli/scripts/*
*/llama_stack/ui/*
*/llama_stack/strong_typing/*
*/llama_stack/env.py
*/__init__.py

View file

@ -16,6 +16,9 @@ if [ $FOUND_PYTHON -ne 0 ]; then
uv python install "$PYTHON_VERSION" uv python install "$PYTHON_VERSION"
fi fi
# Run unit tests with coverage
uv run --python "$PYTHON_VERSION" --with-editable . --group unit \ uv run --python "$PYTHON_VERSION" --with-editable . --group unit \
coverage run --source=llama_stack -m pytest -s -v tests/unit/ "$@" && \ coverage run --source=llama_stack -m pytest -s -v tests/unit/ "$@"
# Generate HTML coverage report
uv run --python "$PYTHON_VERSION" coverage html -d htmlcov-$PYTHON_VERSION uv run --python "$PYTHON_VERSION" coverage html -d htmlcov-$PYTHON_VERSION

2
uv.lock generated
View file

@ -1372,6 +1372,7 @@ unit = [
{ name = "aiosqlite" }, { name = "aiosqlite" },
{ name = "blobfile" }, { name = "blobfile" },
{ name = "chardet" }, { name = "chardet" },
{ name = "coverage" },
{ name = "faiss-cpu" }, { name = "faiss-cpu" },
{ name = "litellm" }, { name = "litellm" },
{ name = "mcp" }, { name = "mcp" },
@ -1480,6 +1481,7 @@ unit = [
{ name = "aiosqlite" }, { name = "aiosqlite" },
{ name = "blobfile" }, { name = "blobfile" },
{ name = "chardet" }, { name = "chardet" },
{ name = "coverage" },
{ name = "faiss-cpu" }, { name = "faiss-cpu" },
{ name = "litellm" }, { name = "litellm" },
{ name = "mcp" }, { name = "mcp" },