mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
test(ci): add separate pinned Claude Code version job
Add a dedicated pinned-version Claude Code image build and E2E test job so version-compatibility coverage runs independently from the default latest-policy Claude Code path. Made-with: Cursor
This commit is contained in:
parent
258328fa0d
commit
c79ff50563
1 changed files with 96 additions and 0 deletions
|
|
@ -2407,6 +2407,95 @@ jobs:
|
|||
paths:
|
||||
- claude-code-client.tar.zst
|
||||
|
||||
build_claude_code_client_image_pinned:
|
||||
machine:
|
||||
image: ubuntu-2204:2024.04.1
|
||||
resource_class: medium
|
||||
working_directory: ~/project
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Build pinned Claude Code client image
|
||||
command: |
|
||||
docker build \
|
||||
--build-arg CLAUDE_CODE_VERSION=2.1.100 \
|
||||
-t claude-code-client-pinned:ci \
|
||||
-f tests/proxy_e2e_anthropic_messages_tests/claude_code/Dockerfile.claude-code \
|
||||
tests/proxy_e2e_anthropic_messages_tests/claude_code
|
||||
- run:
|
||||
name: Save pinned Claude Code image to workspace root
|
||||
command: |
|
||||
docker save claude-code-client-pinned:ci | zstd -1 -T0 > claude-code-client-pinned.tar.zst
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
- claude-code-client-pinned.tar.zst
|
||||
|
||||
proxy_e2e_claude_code_pinned_version_tests:
|
||||
machine:
|
||||
image: ubuntu-2204:2024.04.1
|
||||
resource_class: large
|
||||
working_directory: ~/project
|
||||
steps:
|
||||
- checkout
|
||||
- setup_google_dns
|
||||
- attach_workspace:
|
||||
at: ~/project
|
||||
- run:
|
||||
name: Load Docker Database Image
|
||||
command: |
|
||||
zstd -d litellm-docker-database.tar.zst --stdout | docker load
|
||||
docker images | grep litellm-docker-database
|
||||
- run:
|
||||
name: Load pinned Claude Code client image
|
||||
command: |
|
||||
zstd -d claude-code-client-pinned.tar.zst --stdout | docker load
|
||||
docker images | grep claude-code-client-pinned
|
||||
- run:
|
||||
name: Verify required container images stage
|
||||
command: |
|
||||
docker image inspect litellm-docker-database:ci >/dev/null
|
||||
docker image inspect claude-code-client-pinned:ci >/dev/null
|
||||
echo "LiteLLM and pinned Claude Code images are ready"
|
||||
- run:
|
||||
name: Run Dockerized Claude Code pinned-version E2E Tests
|
||||
command: |
|
||||
mkdir -p test-results
|
||||
: "${LITELLM_MASTER_KEY:?Set LITELLM_MASTER_KEY in CircleCI project env vars.}"
|
||||
: "${ANTHROPIC_API_KEY:?Set ANTHROPIC_API_KEY in CircleCI project env vars.}"
|
||||
set +e
|
||||
LITELLM_IMAGE=litellm-docker-database:ci \
|
||||
CLAUDE_CODE_IMAGE=claude-code-client-pinned:ci \
|
||||
UPSTREAM_PROVIDER=anthropic \
|
||||
LITELLM_SKIP_BUILD=true \
|
||||
CLAUDE_CODE_SKIP_BUILD=true \
|
||||
LITELLM_MASTER_KEY="${LITELLM_MASTER_KEY}" \
|
||||
tests/proxy_e2e_anthropic_messages_tests/claude_code/run_claude_code_docker_test.sh
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
printf '%s\n' \
|
||||
'<?xml version="1.0" encoding="UTF-8"?>' \
|
||||
'<testsuite name="proxy_e2e_claude_code_pinned_version_tests" tests="1" failures="0">' \
|
||||
' <testcase classname="claude_code_docker" name="claude_code_through_litellm_pinned_version"/>' \
|
||||
'</testsuite>' \
|
||||
> test-results/junit.xml
|
||||
else
|
||||
printf '%s\n' \
|
||||
'<?xml version="1.0" encoding="UTF-8"?>' \
|
||||
'<testsuite name="proxy_e2e_claude_code_pinned_version_tests" tests="1" failures="1">' \
|
||||
' <testcase classname="claude_code_docker" name="claude_code_through_litellm_pinned_version">' \
|
||||
' <failure message="Dockerized Claude Code pinned-version E2E test failed">See CircleCI job output for Docker and LiteLLM logs.</failure>' \
|
||||
' </testcase>' \
|
||||
'</testsuite>' \
|
||||
> test-results/junit.xml
|
||||
fi
|
||||
exit "$status"
|
||||
no_output_timeout: 15m
|
||||
|
||||
# Store test results
|
||||
- store_test_results:
|
||||
path: test-results
|
||||
|
||||
|
||||
test_bad_database_url:
|
||||
machine:
|
||||
|
|
@ -2482,6 +2571,8 @@ workflows:
|
|||
filters: *main_branches
|
||||
- build_claude_code_client_image:
|
||||
filters: *main_branches
|
||||
- build_claude_code_client_image_pinned:
|
||||
filters: *main_branches
|
||||
- e2e_ui_testing:
|
||||
filters: *main_branches
|
||||
- build_and_test:
|
||||
|
|
@ -2523,6 +2614,11 @@ workflows:
|
|||
- build_docker_database_image
|
||||
- build_claude_code_client_image
|
||||
filters: *main_branches
|
||||
- proxy_e2e_claude_code_pinned_version_tests:
|
||||
requires:
|
||||
- build_docker_database_image
|
||||
- build_claude_code_client_image_pinned
|
||||
filters: *main_branches
|
||||
- proxy_e2e_claude_code_bedrock_tests:
|
||||
requires:
|
||||
- build_docker_database_image
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue