Neon branching per e2e test
This commit is contained in:
parent
ce4e2132a2
commit
cf9b69aa12
@ -3544,11 +3544,36 @@ jobs:
|
||||
- setup_google_dns
|
||||
- attach_workspace:
|
||||
at: ~/project
|
||||
- run:
|
||||
name: Install Neon CLI
|
||||
command: |
|
||||
curl -fsSL https://neon.tech/install.sh | bash
|
||||
echo 'export PATH="$HOME/.neon/bin:$PATH"' >> $BASH_ENV
|
||||
- run:
|
||||
name: Load Docker Database Image
|
||||
command: |
|
||||
gunzip -c litellm-docker-database.tar.gz | docker load
|
||||
docker images | grep litellm-docker-database
|
||||
- run:
|
||||
name: Create Neon branch
|
||||
command: |
|
||||
export NEON_BRANCH_NAME="preview/commit-${CIRCLE_SHA1:0:7}"
|
||||
|
||||
neon branches create \
|
||||
--project-id $NEON_PROJECT_ID \
|
||||
--name $NEON_BRANCH_NAME \
|
||||
--api-key $NEON_API_KEY || true
|
||||
- run:
|
||||
name: Load DB URL
|
||||
command: |
|
||||
DB_URL=$(neon connection-string \
|
||||
--project-id $NEON_PROJECT_ID \
|
||||
--api-key $NEON_API_KEY \
|
||||
--branch $NEON_BRANCH_NAME \
|
||||
--database yuneng-trial-db \
|
||||
--role neondb_owner)
|
||||
|
||||
echo "export E2E_UI_TEST_DATABASE_URL=$DB_URL" >> $BASH_ENV
|
||||
- run:
|
||||
name: Install Dependencies
|
||||
command: |
|
||||
@ -3562,7 +3587,7 @@ jobs:
|
||||
command: |
|
||||
docker run -d \
|
||||
-p 4000:4000 \
|
||||
-e DATABASE_URL=$SMALL_DATABASE_URL \
|
||||
-e DATABASE_URL=$E2E_UI_TEST_DATABASE_URL \
|
||||
-e LITELLM_MASTER_KEY="sk-1234" \
|
||||
-e OPENAI_API_KEY=$OPENAI_API_KEY \
|
||||
-e UI_USERNAME="admin" \
|
||||
@ -3604,6 +3629,15 @@ jobs:
|
||||
- store_artifacts:
|
||||
path: playwright-report
|
||||
destination: playwright-report
|
||||
- run:
|
||||
name: Delete Neon branch
|
||||
command: |
|
||||
neon branches delete \
|
||||
--project-id $NEON_PROJECT_ID \
|
||||
--name $NEON_BRANCH_NAME \
|
||||
--api-key $NEON_API_KEY \
|
||||
--yes || true
|
||||
when: always
|
||||
|
||||
test_nonroot_image:
|
||||
machine:
|
||||
@ -3792,6 +3826,7 @@ workflows:
|
||||
- main
|
||||
- /litellm_.*/
|
||||
- e2e_ui_testing:
|
||||
context: e2e_ui_tests
|
||||
requires:
|
||||
- ui_build
|
||||
- build_docker_database_image
|
||||
|
||||
Loading…
Reference in New Issue
Block a user