From 9f506860b51eca5113319d378d1fe9d1c0bde958 Mon Sep 17 00:00:00 2001 From: Krish Dholakia Date: Sat, 12 Oct 2024 22:37:46 -0700 Subject: [PATCH] ci(config.yml): add further testing coverage to codecov (#6184) Improve visibility into current testing --- .circleci/config.yml | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 03b351c4f..075db810d 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: