Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 80 additions & 59 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ jobs:
pip install opentelemetry-api==1.25.0
pip install opentelemetry-sdk==1.25.0
pip install opentelemetry-exporter-otlp==1.25.0
pip install openai==1.54.0
pip install prisma==0.11.0
pip install "detect_secrets==1.5.0"
pip install openai==1.54.0
pip install prisma==0.11.0
pip install "detect_secrets==1.5.0"
pip install "httpx==0.24.1"
pip install "respx==0.21.1"
pip install fastapi
Expand Down Expand Up @@ -165,9 +165,9 @@ jobs:
pip install opentelemetry-api==1.25.0
pip install opentelemetry-sdk==1.25.0
pip install opentelemetry-exporter-otlp==1.25.0
pip install openai==1.54.0
pip install prisma==0.11.0
pip install "detect_secrets==1.5.0"
pip install openai==1.54.0
pip install prisma==0.11.0
pip install "detect_secrets==1.5.0"
pip install "httpx==0.24.1"
pip install "respx==0.21.1"
pip install fastapi
Expand Down Expand Up @@ -264,9 +264,9 @@ jobs:
pip install opentelemetry-api==1.25.0
pip install opentelemetry-sdk==1.25.0
pip install opentelemetry-exporter-otlp==1.25.0
pip install openai==1.54.0
pip install prisma==0.11.0
pip install "detect_secrets==1.5.0"
pip install openai==1.54.0
pip install prisma==0.11.0
pip install "detect_secrets==1.5.0"
pip install "httpx==0.24.1"
pip install "respx==0.21.1"
pip install fastapi
Expand Down Expand Up @@ -367,18 +367,18 @@ jobs:
# Store test results
- store_test_results:
path: test-results

- persist_to_workspace:
root: .
paths:
- auth_ui_unit_tests_coverage.xml
- auth_ui_unit_tests_coverage
litellm_router_testing: # Runs all tests with the "router" keyword
docker:
- image: cimg/python:3.11
auth:
username: ${DOCKERHUB_USERNAME}
password: ${DOCKERHUB_PASSWORD}
- image: cimg/python:3.11
auth:
username: ${DOCKERHUB_USERNAME}
password: ${DOCKERHUB_PASSWORD}
working_directory: ~/project

steps:
Expand Down Expand Up @@ -417,10 +417,10 @@ jobs:
- litellm_router_coverage
litellm_proxy_unit_testing: # Runs all tests with the "proxy", "key", "jwt" filenames
docker:
- image: cimg/python:3.11
auth:
username: ${DOCKERHUB_USERNAME}
password: ${DOCKERHUB_PASSWORD}
- image: cimg/python:3.11
auth:
username: ${DOCKERHUB_USERNAME}
password: ${DOCKERHUB_PASSWORD}
working_directory: ~/project
steps:
- checkout
Expand Down Expand Up @@ -458,9 +458,9 @@ jobs:
pip install opentelemetry-api==1.25.0
pip install opentelemetry-sdk==1.25.0
pip install opentelemetry-exporter-otlp==1.25.0
pip install openai==1.54.0
pip install prisma==0.11.0
pip install "detect_secrets==1.5.0"
pip install openai==1.54.0
pip install prisma==0.11.0
pip install "detect_secrets==1.5.0"
pip install "httpx==0.24.1"
pip install "respx==0.21.1"
pip install fastapi
Expand Down Expand Up @@ -514,10 +514,10 @@ jobs:
- litellm_proxy_unit_tests_coverage
litellm_assistants_api_testing: # Runs all tests with the "assistants" keyword
docker:
- image: cimg/python:3.11
auth:
username: ${DOCKERHUB_USERNAME}
password: ${DOCKERHUB_PASSWORD}
- image: cimg/python:3.11
auth:
username: ${DOCKERHUB_USERNAME}
password: ${DOCKERHUB_PASSWORD}
working_directory: ~/project

steps:
Expand Down Expand Up @@ -616,7 +616,7 @@ jobs:
command: |
mv coverage.xml llm_translation_coverage.xml
mv .coverage llm_translation_coverage

# Store test results
- store_test_results:
path: test-results
Expand Down Expand Up @@ -660,7 +660,7 @@ jobs:
command: |
mv coverage.xml batches_coverage.xml
mv .coverage batches_coverage

# Store test results
- store_test_results:
path: test-results
Expand Down Expand Up @@ -704,7 +704,7 @@ jobs:
command: |
mv coverage.xml secret_manager_coverage.xml
mv .coverage secret_manager_coverage

# Store test results
- store_test_results:
path: test-results
Expand Down Expand Up @@ -747,7 +747,7 @@ jobs:
command: |
mv coverage.xml pass_through_unit_tests_coverage.xml
mv .coverage pass_through_unit_tests_coverage

# Store test results
- store_test_results:
path: test-results
Expand Down Expand Up @@ -789,7 +789,7 @@ jobs:
command: |
mv coverage.xml image_gen_coverage.xml
mv .coverage image_gen_coverage

# Store test results
- store_test_results:
path: test-results
Expand Down Expand Up @@ -835,7 +835,7 @@ jobs:
command: |
mv coverage.xml logging_coverage.xml
mv .coverage logging_coverage

# Store test results
- store_test_results:
path: test-results
Expand Down Expand Up @@ -875,7 +875,7 @@ jobs:
pwd
ls
python -m pytest -vv tests/local_testing/test_basic_python_version.py

installing_litellm_on_python_3_13:
docker:
- image: cimg/python:3.13.1
Expand Down Expand Up @@ -973,7 +973,7 @@ jobs:
cat docker_output.log
exit 1
fi

build_and_test:
machine:
image: ubuntu-2204:2023.10.1
Expand Down Expand Up @@ -1019,9 +1019,9 @@ jobs:
pip install "langfuse>=2.0.0"
pip install "logfire==0.29.0"
pip install numpydoc
pip install prisma
pip install fastapi
pip install jsonschema
pip install prisma
pip install fastapi
pip install jsonschema
pip install "httpx==0.24.1"
pip install "gunicorn==21.2.0"
pip install "anyio==3.7.1"
Expand Down Expand Up @@ -1137,9 +1137,9 @@ jobs:
pip install "langfuse>=2.0.0"
pip install "logfire==0.29.0"
pip install numpydoc
pip install prisma
pip install fastapi
pip install jsonschema
pip install prisma
pip install fastapi
pip install jsonschema
pip install "httpx==0.24.1"
pip install "gunicorn==21.2.0"
pip install "anyio==3.7.1"
Expand Down Expand Up @@ -1256,9 +1256,9 @@ jobs:
pip install "langfuse>=2.0.0"
pip install "logfire==0.29.0"
pip install numpydoc
pip install prisma
pip install fastapi
pip install jsonschema
pip install prisma
pip install fastapi
pip install jsonschema
pip install "httpx==0.24.1"
pip install "gunicorn==21.2.0"
pip install "anyio==3.7.1"
Expand Down Expand Up @@ -1321,8 +1321,9 @@ jobs:
pwd
ls
python -m pytest -vv tests/otel_tests -x --junitxml=test-results/junit.xml --durations=5
no_output_timeout: 120m
# Clean up first container
no_output_timeout:
120m
# Clean up first container
- run:
name: Stop and remove first container
command: |
Expand Down Expand Up @@ -1458,8 +1459,9 @@ jobs:
name: Run tests
command: |
python -m pytest -vv tests/basic_proxy_startup_tests -x --junitxml=test-results/junit-2.xml --durations=5
no_output_timeout: 120m
# Clean up first container
no_output_timeout:
120m
# Clean up first container
- run:
name: Stop and remove first container
command: |
Expand Down Expand Up @@ -1506,9 +1508,9 @@ jobs:
pip install mypy
pip install pyarrow
pip install numpydoc
pip install prisma
pip install fastapi
pip install jsonschema
pip install prisma
pip install fastapi
pip install jsonschema
pip install "httpx==0.24.1"
pip install "anyio==3.7.1"
pip install "asyncio==3.4.3"
Expand Down Expand Up @@ -1610,7 +1612,6 @@ jobs:
- codecov/upload:
file: ./coverage.xml


publish_to_pypi:
docker:
- image: cimg/python:3.8
Expand All @@ -1637,7 +1638,6 @@ jobs:
circleci step halt
fi


- run:
name: Checkout code
command: git checkout $CIRCLE_SHA1
Expand Down Expand Up @@ -1726,9 +1726,9 @@ jobs:
pip install mypy
pip install pyarrow
pip install numpydoc
pip install prisma
pip install fastapi
pip install jsonschema
pip install prisma
pip install fastapi
pip install jsonschema
pip install "httpx==0.24.1"
pip install "anyio==3.7.1"
pip install "asyncio==3.4.3"
Expand Down Expand Up @@ -1779,6 +1779,28 @@ jobs:
- store_test_results:
path: test-results

test_nonroot_image:
machine:
image: ubuntu-2204:2023.10.1
resource_class: xlarge
working_directory: ~/project
steps:
- checkout
- run:
name: Build Docker image
command: |
docker build -t non_root_image:latest . -f ./docker/Dockerfile.non_root
- run:
name: Install Container Structure Test
command: |
curl -LO https://github.com/GoogleContainerTools/container-structure-test/releases/download/v1.19.3/container-structure-test-linux-amd64
chmod +x container-structure-test-linux-amd64
sudo mv container-structure-test-linux-amd64 /usr/local/bin/container-structure-test
- run:
name: Run Container Structure Test
command: |
container-structure-test test --image non_root_image:latest --config docker/tests/nonroot.yaml

test_bad_database_url:
machine:
image: ubuntu-2204:2023.10.1
Expand Down Expand Up @@ -1844,10 +1866,10 @@ workflows:
- /litellm_.*/
- litellm_assistants_api_testing:
filters:
branches:
only:
- main
- /litellm_.*/
branches:
only:
- main
- /litellm_.*/
- litellm_router_testing:
filters:
branches:
Expand Down Expand Up @@ -2014,4 +2036,3 @@ workflows:
branches:
only:
- main

Loading