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]

ci(config.yml): add further testing coverage to codecov (#6184)

Krish Dholakia9f506860b51e
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 03b351c4f90..075db810db5 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -137,6 +137,7 @@ jobs:
pip install "pytest==7.3.1"
pip install "pytest-retry==1.6.3"
pip install "pytest-asyncio==0.21.1"
+ pip install "pytest-cov==5.0.0"
- save_cache:
paths:
- ./venv
@@ -154,12 +155,24 @@ jobs:
command: |
pwd
ls
- python -m pytest -vv tests/proxy_admin_ui_tests -x --junitxml=test-results/junit.xml --durations=5
+ python -m pytest -vv tests/proxy_admin_ui_tests -x --cov=litellm --cov-report=xml --junitxml=test-results/junit.xml --durations=5
no_output_timeout: 120m
+ - run:
+ name: Rename the coverage files
+ command: |
+ mv coverage.xml ui_endpoint_testing_coverage.xml
+ mv .coverage ui_endpoint_testing_coverage
+
# Store test results
- store_test_results:
path: test-results
+
+ - persist_to_workspace:
+ root: .
+ paths:
+ - ui_endpoint_testing_coverage.xml
+ - ui_endpoint_testing_coverage
litellm_router_testing: # Runs all tests with the "router" keyword
docker:
- image: cimg/python:3.11
@@ -221,17 +234,28 @@ jobs:
pip install "respx==0.21.1"
pip install "pytest-retry==1.6.3"
pip install "pytest-asyncio==0.21.1"
+ pip install "pytest-cov==5.0.0"
# Run pytest and generate JUnit XML report
- run:
name: Run tests
command: |
pwd
ls
- python -m pytest tests/local_testing/ -vv -k "assistants" -x -s -v --junitxml=test-results/junit.xml --durations=5
+ python -m pytest tests/local_testing/ -vv -k "assistants" --cov=litellm --cov-report=xml -x -s -v --junitxml=test-results/junit.xml --durations=5
no_output_timeout: 120m
+ - run:
+ name: Rename the coverage files
+ command: |
+ mv coverage.xml litellm_assistants_api_coverage.xml
+ mv .coverage litellm_assistants_api_coverage
# Store test results
- store_test_results:
path: test-results
+ - persist_to_workspace:
+ root: .
+ paths:
+ - litellm_assistants_api_coverage.xml
+ - litellm_assistants_api_coverage
load_testing:
docker:
- image: cimg/python:3.11
@@ -735,7 +759,7 @@ jobs:
python -m venv venv
. venv/bin/activate
pip install coverage
- coverage combine llm_translation_coverage litellm_router_coverage local_testing_coverage
+ coverage combine llm_translation_coverage litellm_router_coverage local_testing_coverage litellm_assistants_api_coverage ui_endpoint_testing_coverage
coverage xml
- codecov/upload:
file: ./coverage.xml
@@ -976,6 +1000,8 @@ workflows:
- llm_translation_testing
- litellm_router_testing
- local_testing
+ - litellm_assistants_api_testing
+ - ui_endpoint_testing
- db_migration_disable_update_check:
filters:
branches: