Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Revert to --cov=litellm, add checkout and root_dir to upload job

joereyna695d726352b0
diff --git a/.github/workflows/test-litellm-matrix.yml b/.github/workflows/test-litellm-matrix.yml
index 461f2bb3053..0818c38bf02 100644
--- a/.github/workflows/test-litellm-matrix.yml
+++ b/.github/workflows/test-litellm-matrix.yml
@@ -172,8 +172,8 @@ jobs:
--reruns-delay 1 \
--dist=loadscope \
--durations=20 \
- --cov=. \
- --cov-report=xml \
+ --cov=litellm \
+ --cov-report=xml:coverage.xml \
--cov-config=pyproject.toml
- name: Save coverage report
@@ -181,7 +181,7 @@ jobs:
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: coverage-${{ matrix.test-group.name }}
- path: coverage-${{ matrix.test-group.name }}.xml
+ path: coverage.xml
retention-days: 1
upload-coverage:
@@ -195,22 +195,27 @@ jobs:
pull-requests: write # Required for Codecov PR comments
steps:
+ - name: Checkout code
+ uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
+
- name: Download all coverage reports
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
pattern: coverage-*
+ path: coverage-reports
merge-multiple: true
- name: Debug coverage paths
run: |
echo "=== source tags ==="
- grep -h "<source>" coverage-root.xml | head -5
+ grep -h "<source>" coverage-reports/coverage.xml | head -5
echo "=== filename samples ==="
- grep -h "filename=" coverage-root.xml | head -10
+ grep -h "filename=" coverage-reports/coverage.xml | head -10
- name: Upload to Codecov
uses: codecov/codecov-action@aa56896cf108bd10b5eb883cd1d24196da57f695 # v5.5.4
with:
use_oidc: true
- files: "*.xml"
+ directory: coverage-reports
+ root_dir: ${{ github.workspace }}
fail_ci_if_error: false
diff --git a/pyproject.toml b/pyproject.toml
index 4c40762deb3..98e5b668c60 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -211,11 +211,5 @@ filterwarnings = [
]
[tool.coverage.run]
-source = ["."]
-omit = [
- "tests/*",
- "enterprise/*",
- ".venv/*",
- "*/site-packages/*",
-]
+source = ["litellm"]
relative_files = true