From 695d726352b038e4ff86aedf8fa0137b2e0b99cc Mon Sep 17 00:00:00 2001 From: joereyna Date: Tue, 31 Mar 2026 13:41:40 -0700 Subject: [PATCH] Revert to --cov=litellm, add checkout and root_dir to upload job --- .github/workflows/test-litellm-matrix.yml | 17 +++++++++++------ pyproject.toml | 8 +------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test-litellm-matrix.yml b/.github/workflows/test-litellm-matrix.yml index 461f2bb305..0818c38bf0 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 "" coverage-root.xml | head -5 + grep -h "" 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 4c40762deb..98e5b668c6 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