From 9bd96a7e27d7be848d6fc9b71fdea77902a8bd8c Mon Sep 17 00:00:00 2001 From: Shin Date: Sat, 7 Feb 2026 21:06:08 +0000 Subject: [PATCH] perf(ci): Optimize ocr_testing job to reduce run time - Add resource_class: xlarge (8 vCPUs vs default 2) - Add pytest-xdist for parallel test execution (-n 4) - Remove -x flag (stop on first failure) since tests are passing - Remove -s flag (conflicts with parallel execution) This should reduce the ~39 minute job time significantly by: 1. Running tests in parallel 2. Having more CPU for faster pip install --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e171759f1c4..6cf4e59db59 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1558,6 +1558,7 @@ jobs: username: ${DOCKERHUB_USERNAME} password: ${DOCKERHUB_PASSWORD} working_directory: ~/project + resource_class: xlarge steps: - checkout @@ -1571,6 +1572,7 @@ jobs: pip install "pytest-retry==1.6.3" pip install "pytest-cov==5.0.0" pip install "pytest-asyncio==0.21.1" + pip install "pytest-xdist==3.8.0" pip install "respx==0.22.0" # Run pytest and generate JUnit XML report - run: @@ -1578,7 +1580,7 @@ jobs: command: | pwd ls - python -m pytest -vv tests/ocr_tests --cov=litellm --cov-report=xml -x -s -v --junitxml=test-results/junit.xml --durations=5 + python -m pytest -vv tests/ocr_tests --cov=litellm --cov-report=xml -v --junitxml=test-results/junit.xml --durations=5 -n 4 no_output_timeout: 120m - run: name: Rename the coverage files