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]

build(config.yml): migrate build_and_test to ci/cd pg db (#13166)

Krish Dholakiac6a87332340c
diff --git a/.circleci/config.yml b/.circleci/config.yml
index d1c8fc07ec4..5aeebc1074c 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1476,6 +1476,25 @@ jobs:
pip install "asyncio==3.4.3"
pip install "PyGithub==1.59.1"
pip install "openai==1.81.0"
+ - run:
+ name: Install dockerize
+ command: |
+ wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz
+ sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.6.1.tar.gz
+ rm dockerize-linux-amd64-v0.6.1.tar.gz
+ - 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: dockerize -wait tcp://localhost:5432 -timeout 1m
- run:
name: Install Grype
command: |
@@ -1501,7 +1520,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 USE_PRISMA_MIGRATE=True \
-e AZURE_API_KEY=$AZURE_API_KEY \
-e REDIS_HOST=$REDIS_HOST \
@@ -1526,6 +1545,7 @@ jobs:
-e LANGFUSE_PROJECT2_PUBLIC=$LANGFUSE_PROJECT2_PUBLIC \
-e LANGFUSE_PROJECT1_SECRET=$LANGFUSE_PROJECT1_SECRET \
-e LANGFUSE_PROJECT2_SECRET=$LANGFUSE_PROJECT2_SECRET \
+ --add-host host.docker.internal:host-gateway \
--name my-app \
-v $(pwd)/proxy_server_config.yaml:/app/config.yaml \
my-app:latest \
@@ -1533,13 +1553,10 @@ jobs:
--port 4000 \
--detailed_debug \
- run:
- name: Install curl and dockerize
+ name: Install curl
command: |
sudo apt-get update
sudo apt-get install -y curl
- sudo wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz
- sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.6.1.tar.gz
- sudo rm dockerize-linux-amd64-v0.6.1.tar.gz
- run:
name: Start outputting logs
command: docker logs -f my-app
diff --git a/tests/test_openai_endpoints.py b/tests/test_openai_endpoints.py
index 0b5f1a94339..08249247828 100644
--- a/tests/test_openai_endpoints.py
+++ b/tests/test_openai_endpoints.py
@@ -456,21 +456,6 @@ async def test_chat_completion_anthropic_structured_output():
print(message.parsed.events)
-async def test_chat_completion_old_key():
- """
- Production test for backwards compatibility. Test db against a pre-generated (old key)
- - Create key
- Make chat completion call
- """
- async with aiohttp.ClientSession() as session:
- try:
- key = "sk--W0Ph0uDZLVD7V7LQVrslg"
- await chat_completion(session=session, key=key)
- except Exception as e:
- pytest.fail("Invalid api key")
-
-
@pytest.mark.asyncio
async def test_completion():
"""