Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

ci: run migrated unit selections on every event in legacy GHA shards (#43182)

yuneng-jiang694783ebbeca
diff --git a/.github/workflows/_test-unit-base.yml b/.github/workflows/_test-unit-base.yml
index ef1dc53b4a6..fac0d766535 100644
--- a/.github/workflows/_test-unit-base.yml
+++ b/.github/workflows/_test-unit-base.yml
@@ -13,12 +13,13 @@ on:
have its path existence-checked like any other token.
required: true
type: string
- fork-flag:
+ unit-flag:
description: >-
Codecov flag of the `.circleci/tests.yml` job that now owns part of
- this shard. CircleCI does not run on pull requests from forks, so on
- those events this shard also runs the files
- `.circleci/scripts/unit_selection.sh` lists for the flag.
+ this shard. The shard also runs the files
+ `.circleci/scripts/unit_selection.sh` lists for the flag, on every
+ event, because the CircleCI pipeline is manual-only while the tests
+ migrate.
required: false
type: string
default: ""
@@ -175,8 +176,7 @@ jobs:
timeout-minutes: ${{ inputs.timeout-minutes }}
env:
TEST_PATH: ${{ inputs.test-path }}
- FORK_FLAG: ${{ inputs.fork-flag }}
- IS_FORK: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
+ UNIT_FLAG: ${{ inputs.unit-flag }}
MAX_FAILURES: ${{ inputs.max-failures }}
WORKERS: ${{ inputs.workers }}
RERUNS: ${{ inputs.reruns }}
@@ -186,11 +186,11 @@ jobs:
run: |
echo "has-coverage=false" >> "$GITHUB_OUTPUT"
selection="${TEST_PATH}"
- if [ "${IS_FORK}" = "true" ] && [ -n "${FORK_FLAG}" ]; then
- selection="${TEST_PATH} $(bash .circleci/scripts/unit_selection.sh "${FORK_FLAG}" | tr '\n' ' ')"
+ if [ -n "${UNIT_FLAG}" ]; then
+ selection="${TEST_PATH} $(bash .circleci/scripts/unit_selection.sh "${UNIT_FLAG}" | tr '\n' ' ')"
fi
if [ -z "${selection// /}" ]; then
- echo "shard selection is empty on this event (CircleCI flag ${FORK_FLAG:-none} owns it); nothing to run"
+ echo "shard selection is empty; nothing to run"
exit 0
fi
pytest_args=()
diff --git a/.github/workflows/test-unit-proxy-db.yml b/.github/workflows/test-unit-proxy-db.yml
index 86b385d91a7..da4477b6947 100644
--- a/.github/workflows/test-unit-proxy-db.yml
+++ b/.github/workflows/test-unit-proxy-db.yml
@@ -22,9 +22,10 @@ concurrency:
#
# `.circleci/tests.yml` runs each group's files on same-repo events under the
# `proxy-db-<group>` Codecov flag; `.circleci/scripts/unit_selection.sh` holds
-# the file lists. CircleCI does not build pull requests from forks, so `fork-flag`
-# makes the shard run that list there. `test-path` keeps the files that still
-# reach real providers and never left tests/proxy_unit_tests.
+# the file lists. That pipeline is manual-only while the tests migrate, so
+# `unit-flag` makes the shard run that list on every event. `test-path` keeps
+# the files that still reach real providers and never left
+# tests/proxy_unit_tests.
#
# Design targets:
# * Every shard runs in <= 7 minutes of wall-clock on the default runner.
@@ -78,7 +79,7 @@ jobs:
# Must run serially — event-loop conflict with the logging worker.
- test-group: key-generation
test-path: ""
- fork-flag: proxy-db-key-generation
+ unit-flag: proxy-db-key-generation
workers: 0
dist: loadscope
timeout: 20
@@ -86,13 +87,13 @@ jobs:
# ---- auth: split into 2 shards ----
- test-group: auth-checks
test-path: ""
- fork-flag: proxy-db-auth-checks
+ unit-flag: proxy-db-auth-checks
workers: 4
dist: loadscope
timeout: 15
- test-group: jwt-and-keys
test-path: ""
- fork-flag: proxy-db-jwt-and-keys
+ unit-flag: proxy-db-jwt-and-keys
workers: 4
dist: loadscope
timeout: 15
@@ -100,7 +101,7 @@ jobs:
# ---- test_proxy_utils.py, single shard, worksteal distribution ----
- test-group: proxy-utils
test-path: ""
- fork-flag: proxy-db-proxy-utils
+ unit-flag: proxy-db-proxy-utils
workers: 4
dist: worksteal
timeout: 15
@@ -108,13 +109,13 @@ jobs:
# ---- proxy server: split into 2 shards ----
- test-group: proxy-server-core
test-path: "tests/proxy_unit_tests/test_proxy_server_gemini_pass_through.py"
- fork-flag: proxy-db-proxy-server-core
+ unit-flag: proxy-db-proxy-server-core
workers: 4
dist: loadscope
timeout: 15
- test-group: proxy-runtime
test-path: ""
- fork-flag: proxy-db-proxy-runtime
+ unit-flag: proxy-db-proxy-runtime
workers: 4
dist: loadscope
timeout: 15
@@ -122,20 +123,20 @@ jobs:
# ---- logging: split into 2 shards ----
- test-group: custom-logging
test-path: "tests/proxy_unit_tests/test_proxy_custom_logger.py"
- fork-flag: proxy-db-custom-logging
+ unit-flag: proxy-db-custom-logging
workers: 4
dist: loadscope
timeout: 15
- test-group: logging-misc
test-path: ""
- fork-flag: proxy-db-logging-misc
+ unit-flag: proxy-db-logging-misc
workers: 4
dist: loadscope
timeout: 15
- test-group: db-and-spend
test-path: ""
- fork-flag: proxy-db-db-and-spend
+ unit-flag: proxy-db-db-and-spend
workers: 4
dist: loadscope
timeout: 15
@@ -143,27 +144,27 @@ jobs:
# ---- guardrails + budget + hooks: split into 2 ----
- test-group: guardrails-hooks
test-path: ""
- fork-flag: proxy-db-guardrails-hooks
+ unit-flag: proxy-db-guardrails-hooks
workers: 4
dist: loadscope
timeout: 15
- test-group: budgets
test-path: ""
- fork-flag: proxy-db-budgets
+ unit-flag: proxy-db-budgets
workers: 4
dist: loadscope
timeout: 15
- test-group: endpoints-and-responses
test-path: "tests/proxy_unit_tests/test_proxy_exception_mapping.py"
- fork-flag: proxy-db-endpoints-and-responses
+ unit-flag: proxy-db-endpoints-and-responses
workers: 4
dist: loadscope
timeout: 15
uses: ./.github/workflows/_test-unit-base.yml
with:
test-path: ${{ matrix.test-path }}
- fork-flag: ${{ matrix.fork-flag }}
+ unit-flag: ${{ matrix.unit-flag }}
workers: ${{ matrix.workers }}
reruns: 2
timeout-minutes: ${{ matrix.timeout }}
diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml
index 126a6e26e6f..a60d230d05f 100644
--- a/.github/workflows/test-unit.yml
+++ b/.github/workflows/test-unit.yml
@@ -36,9 +36,9 @@ concurrency:
# Folding it in here is a follow-up, together with generalising that guard into
# assert_ci_coverage.py.
#
-# `fork-flag` names the `.circleci/tests.yml` job that now runs part of the
-# shard under the same Codecov flag. CircleCI does not build pull requests from
-# forks, so the shard still runs those files there and skips them elsewhere.
+# `unit-flag` names the `.circleci/tests.yml` job that now runs part of the
+# shard under the same Codecov flag. That pipeline is manual-only while the
+# tests migrate, so the shard also runs those files on every event.
jobs:
unit:
name: ${{ matrix.shard }}
@@ -53,7 +53,7 @@ jobs:
- shard: mcp-integration
artifact-name: mcp-integration
test-path: "tests/mcp_tests tests/test_litellm/experimental_mcp_client"
- fork-flag: mcp-integration
+ unit-flag: mcp-integration
workers: 2
reruns: 0
timeout-minutes: 20
@@ -73,7 +73,7 @@ jobs:
tests/test_litellm/google_genai
tests/test_litellm/router_utils
tests/test_litellm/router_strategy
- fork-flag: enterprise-routing
+ unit-flag: enterprise-routing
workers: 2
reruns: 2
timeout-minutes: 20
@@ -205,7 +205,7 @@ jobs:
tests/test_litellm/proxy/types_utils
tests/test_litellm/proxy/logging_endpoints
tests/test_litellm/proxy/test_*.py
- fork-flag: proxy-infra
+ unit-flag: proxy-infra
workers: 4
reruns: 2
timeout-minutes: 20
@@ -214,7 +214,7 @@ jobs:
- shard: caching-local
artifact-name: caching-local
test-path: ""
- fork-flag: caching-local
+ unit-flag: caching-local
workers: 2
reruns: 2
timeout-minutes: 20
@@ -223,7 +223,7 @@ jobs:
- shard: proxy-extras
artifact-name: proxy-extras
test-path: ""
- fork-flag: proxy-extras
+ unit-flag: proxy-extras
workers: 2
reruns: 2
timeout-minutes: 20
@@ -232,7 +232,7 @@ jobs:
- shard: enterprise-package
artifact-name: enterprise-package
test-path: ""
- fork-flag: enterprise-package
+ unit-flag: enterprise-package
workers: 4
reruns: 2
timeout-minutes: 20
@@ -251,7 +251,7 @@ jobs:
uses: ./.github/workflows/_test-unit-base.yml
with:
test-path: ${{ matrix.test-path }}
- fork-flag: ${{ matrix.fork-flag || '' }}
+ unit-flag: ${{ matrix.unit-flag || '' }}
workers: ${{ matrix.workers }}
reruns: ${{ matrix.reruns }}
timeout-minutes: ${{ matrix.timeout-minutes }}