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]

test: use dynamic db

Krrish Dholakia37440c28b76b
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 16019fe047b..126794f3feb 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -2483,6 +2483,20 @@ jobs:
name: Build Docker image
command: |
docker build -t my-app:latest -f docker/build_from_pip/Dockerfile.build_from_pip .
+ - run:
+ name: Start PostgreSQL Database
+ command: |
+ docker run -d \
+ --name postgres-db \
+ -e POSTGRES_USER=postgres \
+ -e POSTGRES_PASSWORD=postgres \
+ -e POSTGRES_DB=circle_test \
+ -p 5432:5432 \
+ postgres:14
+ - run:
+ name: Wait for PostgreSQL to be ready
+ command: |
+ timeout 60s bash -c 'until docker exec postgres-db pg_isready -U postgres -d circle_test; do sleep 2; done'
- run:
name: Run Docker container
# intentionally give bad redis credentials here
@@ -2490,7 +2504,7 @@ jobs:
command: |
docker run -d \
-p 4000:4000 \
- -e DATABASE_URL=$PROXY_DATABASE_URL \
+ -e DATABASE_URL=postgresql://postgres:[email protected]:5432/circle_test \
-e REDIS_HOST=$REDIS_HOST \
-e REDIS_PASSWORD=$REDIS_PASSWORD \
-e REDIS_PORT=$REDIS_PORT \
@@ -2510,6 +2524,7 @@ jobs:
-e DD_API_KEY=$DD_API_KEY \
-e DD_SITE=$DD_SITE \
-e GCS_FLUSH_INTERVAL="1" \
+ --add-host host.docker.internal:host-gateway \
--name my-app \
-v $(pwd)/docker/build_from_pip/litellm_config.yaml:/app/config.yaml \
my-app:latest \
@@ -2540,8 +2555,11 @@ jobs:
- run:
name: Stop and remove first container
command: |
- docker stop my-app
- docker rm my-app
+ docker stop my-app || true
+ docker rm my-app || true
+ docker stop postgres-db || true
+ docker rm postgres-db || true
+ when: always
proxy_pass_through_endpoint_tests:
machine:
image: ubuntu-2204:2023.10.1