diff --git a/.github/workflows/test-mcp.yml b/.github/workflows/test-mcp.yml index 2ae60951afc..20ec5ab270d 100644 --- a/.github/workflows/test-mcp.yml +++ b/.github/workflows/test-mcp.yml @@ -1,6 +1,11 @@ name: LiteLLM MCP Tests (folder - tests/mcp_tests) on: + push: + branches: + - main + - litellm_internal_staging + - litellm_oss_branch pull_request: branches: - main @@ -10,6 +15,7 @@ on: permissions: contents: read + id-token: write jobs: test: @@ -43,4 +49,13 @@ jobs: - name: Run MCP tests run: | - uv run --no-sync pytest tests/mcp_tests -x -vv -n 4 --cov=./litellm --cov-report=xml --durations=5 + uv run --no-sync pytest tests/mcp_tests -x -vv -n 4 --cov=./litellm --cov-report=xml --cov-config=pyproject.toml --durations=5 + + - name: Upload coverage to Codecov + if: success() + uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4 + with: + use_oidc: true + files: coverage.xml + flags: mcp + fail_ci_if_error: false diff --git a/.github/workflows/test-unit-core-utils.yml b/.github/workflows/test-unit-core-utils.yml index da1267756cd..bc8afa8e050 100644 --- a/.github/workflows/test-unit-core-utils.yml +++ b/.github/workflows/test-unit-core-utils.yml @@ -1,6 +1,11 @@ name: "Unit Tests: Core Utilities" on: + push: + branches: + - main + - litellm_internal_staging + - litellm_oss_branch pull_request: branches: - main diff --git a/.github/workflows/test-unit-enterprise-routing.yml b/.github/workflows/test-unit-enterprise-routing.yml index ffc09dd8f94..29477eabca4 100644 --- a/.github/workflows/test-unit-enterprise-routing.yml +++ b/.github/workflows/test-unit-enterprise-routing.yml @@ -1,6 +1,11 @@ name: "Unit Tests: Enterprise, Google GenAI & Routing" on: + push: + branches: + - main + - litellm_internal_staging + - litellm_oss_branch pull_request: branches: - main diff --git a/.github/workflows/test-unit-integrations.yml b/.github/workflows/test-unit-integrations.yml index b316ad5dfdf..5bb69f714b4 100644 --- a/.github/workflows/test-unit-integrations.yml +++ b/.github/workflows/test-unit-integrations.yml @@ -1,6 +1,11 @@ name: "Unit Tests: Integrations (Callbacks & Logging)" on: + push: + branches: + - main + - litellm_internal_staging + - litellm_oss_branch pull_request: branches: - main diff --git a/.github/workflows/test-unit-llm-providers.yml b/.github/workflows/test-unit-llm-providers.yml index 2a1912ce92d..5d088a59337 100644 --- a/.github/workflows/test-unit-llm-providers.yml +++ b/.github/workflows/test-unit-llm-providers.yml @@ -1,6 +1,11 @@ name: "Unit Tests: LLM Provider Transformations" on: + push: + branches: + - main + - litellm_internal_staging + - litellm_oss_branch pull_request: branches: - main diff --git a/.github/workflows/test-unit-misc.yml b/.github/workflows/test-unit-misc.yml index 9add77ff424..9d16eefc535 100644 --- a/.github/workflows/test-unit-misc.yml +++ b/.github/workflows/test-unit-misc.yml @@ -1,6 +1,11 @@ name: "Unit Tests: MCP, Secrets, Containers & Misc" on: + push: + branches: + - main + - litellm_internal_staging + - litellm_oss_branch pull_request: branches: - main diff --git a/.github/workflows/test-unit-proxy-auth.yml b/.github/workflows/test-unit-proxy-auth.yml index 99882066a8e..5f93a15b524 100644 --- a/.github/workflows/test-unit-proxy-auth.yml +++ b/.github/workflows/test-unit-proxy-auth.yml @@ -1,6 +1,11 @@ name: "Unit Tests: Proxy Auth & Key Management" on: + push: + branches: + - main + - litellm_internal_staging + - litellm_oss_branch pull_request: branches: - main diff --git a/.github/workflows/test-unit-proxy-endpoints.yml b/.github/workflows/test-unit-proxy-endpoints.yml index 0a9513ec024..6e8eda9877e 100644 --- a/.github/workflows/test-unit-proxy-endpoints.yml +++ b/.github/workflows/test-unit-proxy-endpoints.yml @@ -1,6 +1,11 @@ name: "Unit Tests: Proxy API Endpoints" on: + push: + branches: + - main + - litellm_internal_staging + - litellm_oss_branch pull_request: branches: - main diff --git a/.github/workflows/test-unit-proxy-infra.yml b/.github/workflows/test-unit-proxy-infra.yml index 336e53ee3d7..ae3560d9d6f 100644 --- a/.github/workflows/test-unit-proxy-infra.yml +++ b/.github/workflows/test-unit-proxy-infra.yml @@ -1,6 +1,11 @@ name: "Unit Tests: Proxy Infrastructure" on: + push: + branches: + - main + - litellm_internal_staging + - litellm_oss_branch pull_request: branches: - main diff --git a/.github/workflows/test-unit-proxy-mgmt-behavior.yml b/.github/workflows/test-unit-proxy-mgmt-behavior.yml index e73997323a4..1efda2a1fd7 100644 --- a/.github/workflows/test-unit-proxy-mgmt-behavior.yml +++ b/.github/workflows/test-unit-proxy-mgmt-behavior.yml @@ -1,6 +1,11 @@ name: "Unit Tests: Proxy Management-Endpoint Behavior Pinning" on: + push: + branches: + - main + - litellm_internal_staging + - litellm_oss_branch pull_request: branches: - main diff --git a/.github/workflows/test-unit-responses-caching-types.yml b/.github/workflows/test-unit-responses-caching-types.yml index 13069be9e3a..8810d579c26 100644 --- a/.github/workflows/test-unit-responses-caching-types.yml +++ b/.github/workflows/test-unit-responses-caching-types.yml @@ -1,6 +1,11 @@ name: "Unit Tests: Responses, Caching & Types" on: + push: + branches: + - main + - litellm_internal_staging + - litellm_oss_branch pull_request: branches: - main diff --git a/codecov.yaml b/codecov.yaml index 58681b884d0..6bc3f439c21 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -17,7 +17,9 @@ component_management: individual_components: - component_id: "Router" paths: - - "router" + - "*/router.py" + - "*/router_strategy/*" + - "*/router_utils/*" - component_id: "LLMs" paths: - "*/llms/*" diff --git a/pyproject.toml b/pyproject.toml index bc252d3b135..19674ce0363 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -323,3 +323,12 @@ pytest_add_cli_args = [ source = ["litellm"] relative_files = true +[tool.coverage.report] +exclude_also = [ + "if TYPE_CHECKING:", + "raise NotImplementedError", + "if __name__ == .__main__.:", + "@(abc\\.)?abstractmethod", + "@(typing\\.)?overload", +] +