name: "Unit Tests: Caching (Redis)" # Uses cloud Redis credentials — only runs on trusted branches, not PRs. # This prevents external PRs from accessing Redis credentials. on: push: branches: [main, "litellm_*"] permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: caching-redis: uses: ./.github/workflows/_test-unit-services-base.yml with: # Redis-only tests that do NOT require provider API keys. # Tests needing API keys (test_caching.py, test_caching_ssl.py, test_prometheus_service.py, # test_router_caching.py) are in Phase 3 integration workflows. test-path: >- tests/local_testing/test_dual_cache.py tests/local_testing/test_redis_batch_optimizations.py tests/local_testing/test_router_utils.py workers: 2 reruns: 2 timeout-minutes: 20 enable-redis: true enable-postgres: false secrets: REDIS_HOST: ${{ secrets.REDIS_HOST }} REDIS_PORT: ${{ secrets.REDIS_PORT }} REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }} DATABASE_URL: ${{ secrets.DATABASE_URL }} POSTGRES_USER: ${{ secrets.POSTGRES_USER }} POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}