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
This commit is contained in:
Shin 2026-02-07 21:06:08 +00:00
parent a09d3e9162
commit 9bd96a7e27

View file

@ -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