From 37ca659f847592f4a7be6131014c3d1433ec2935 Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Sat, 1 Aug 2026 11:58:49 -0700 Subject: [PATCH] ci: run unit tests on pushes to main and litellm_internal_staging The unit workflows trigger on pull_request only, so a commit that actually lands on a gated branch ends up with no unit-test check runs at all. The commit status API reports success for those commits, which a release gate reads as "nothing failed" rather than "never tested". PR checks also only ever ran against the merge preview, not the commit that landed, so two branches that are each green can still land broken together Add a push trigger on the two gated branches to the twelve unit workflows and to the code-quality workflow, so every landed commit gets check runs addressable by its SHA test-linting.yml is deliberately left on pull_request only; six of its steps gate on a diff against github.event.pull_request.base.sha, which is empty outside a pull request, and a "what did this branch add" check has no meaning on a merge commit Also key the concurrency group on github.sha and restrict cancel-in-progress to pull_request. The previous group was stable across pushes to a branch, so consecutive merges would cancel the in-flight run for the earlier commit and leave that SHA without a result, which is the same blind spot this change is meant to close --- .github/workflows/test-code-quality.yml | 8 ++++++-- .github/workflows/test-unit-core-utils.yml | 8 ++++++-- .github/workflows/test-unit-documentation.yml | 8 ++++++-- .github/workflows/test-unit-enterprise-routing.yml | 8 ++++++-- .github/workflows/test-unit-integrations.yml | 8 ++++++-- .github/workflows/test-unit-llm-providers.yml | 8 ++++++-- .github/workflows/test-unit-misc.yml | 8 ++++++-- .github/workflows/test-unit-proxy-auth.yml | 8 ++++++-- .github/workflows/test-unit-proxy-db.yml | 8 ++++++-- .github/workflows/test-unit-proxy-endpoints.yml | 8 ++++++-- .github/workflows/test-unit-proxy-infra.yml | 8 ++++++-- .github/workflows/test-unit-proxy-legacy.yml | 8 ++++++-- .github/workflows/test-unit-responses-caching-types.yml | 8 ++++++-- 13 files changed, 78 insertions(+), 26 deletions(-) diff --git a/.github/workflows/test-code-quality.yml b/.github/workflows/test-code-quality.yml index ae31395521a..fab05fc2bbb 100644 --- a/.github/workflows/test-code-quality.yml +++ b/.github/workflows/test-code-quality.yml @@ -7,13 +7,17 @@ on: - litellm_internal_staging - litellm_oss_staging - "litellm_**" + push: + branches: + - main + - litellm_internal_staging permissions: contents: read concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: code-quality: diff --git a/.github/workflows/test-unit-core-utils.yml b/.github/workflows/test-unit-core-utils.yml index d6d6353238f..a01f09559c6 100644 --- a/.github/workflows/test-unit-core-utils.yml +++ b/.github/workflows/test-unit-core-utils.yml @@ -7,6 +7,10 @@ on: - litellm_internal_staging - litellm_oss_staging - "litellm_**" + push: + branches: + - main + - litellm_internal_staging permissions: contents: read @@ -14,8 +18,8 @@ permissions: pull-requests: write concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: core-utils: diff --git a/.github/workflows/test-unit-documentation.yml b/.github/workflows/test-unit-documentation.yml index c12a289ce9f..50589cb5926 100644 --- a/.github/workflows/test-unit-documentation.yml +++ b/.github/workflows/test-unit-documentation.yml @@ -7,13 +7,17 @@ on: - litellm_internal_staging - litellm_oss_staging - "litellm_**" + push: + branches: + - main + - litellm_internal_staging permissions: contents: read concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: documentation: diff --git a/.github/workflows/test-unit-enterprise-routing.yml b/.github/workflows/test-unit-enterprise-routing.yml index 13136c968d1..a64f00f4744 100644 --- a/.github/workflows/test-unit-enterprise-routing.yml +++ b/.github/workflows/test-unit-enterprise-routing.yml @@ -7,6 +7,10 @@ on: - litellm_internal_staging - litellm_oss_staging - "litellm_**" + push: + branches: + - main + - litellm_internal_staging permissions: contents: read @@ -14,8 +18,8 @@ permissions: pull-requests: write concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: enterprise-routing: diff --git a/.github/workflows/test-unit-integrations.yml b/.github/workflows/test-unit-integrations.yml index c95ed4e7c24..39752cf8e5d 100644 --- a/.github/workflows/test-unit-integrations.yml +++ b/.github/workflows/test-unit-integrations.yml @@ -7,6 +7,10 @@ on: - litellm_internal_staging - litellm_oss_staging - "litellm_**" + push: + branches: + - main + - litellm_internal_staging permissions: contents: read @@ -14,8 +18,8 @@ permissions: pull-requests: write concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: integrations: diff --git a/.github/workflows/test-unit-llm-providers.yml b/.github/workflows/test-unit-llm-providers.yml index df78564ab0c..4d1c921f723 100644 --- a/.github/workflows/test-unit-llm-providers.yml +++ b/.github/workflows/test-unit-llm-providers.yml @@ -7,13 +7,17 @@ on: - litellm_internal_staging - litellm_oss_staging - "litellm_**" + push: + branches: + - main + - litellm_internal_staging permissions: contents: read concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: vertex-ai: diff --git a/.github/workflows/test-unit-misc.yml b/.github/workflows/test-unit-misc.yml index 9afaaaead93..505e22cfed4 100644 --- a/.github/workflows/test-unit-misc.yml +++ b/.github/workflows/test-unit-misc.yml @@ -7,6 +7,10 @@ on: - litellm_internal_staging - litellm_oss_staging - "litellm_**" + push: + branches: + - main + - litellm_internal_staging permissions: contents: read @@ -14,8 +18,8 @@ permissions: pull-requests: write concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: misc: diff --git a/.github/workflows/test-unit-proxy-auth.yml b/.github/workflows/test-unit-proxy-auth.yml index 97dfaed6e81..c27fe16d611 100644 --- a/.github/workflows/test-unit-proxy-auth.yml +++ b/.github/workflows/test-unit-proxy-auth.yml @@ -7,6 +7,10 @@ on: - litellm_internal_staging - litellm_oss_staging - "litellm_**" + push: + branches: + - main + - litellm_internal_staging permissions: contents: read @@ -14,8 +18,8 @@ permissions: pull-requests: write concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: proxy-auth: diff --git a/.github/workflows/test-unit-proxy-db.yml b/.github/workflows/test-unit-proxy-db.yml index b0ee56f5a5c..60d2e471862 100644 --- a/.github/workflows/test-unit-proxy-db.yml +++ b/.github/workflows/test-unit-proxy-db.yml @@ -7,13 +7,17 @@ on: - litellm_internal_staging - litellm_oss_staging - "litellm_**" + push: + branches: + - main + - litellm_internal_staging permissions: contents: read concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} # Semantic matrix: each shard groups tests by concern (auth, server, logging, …) # rather than alphabetical letter ranges. Adding a new test file means adding it diff --git a/.github/workflows/test-unit-proxy-endpoints.yml b/.github/workflows/test-unit-proxy-endpoints.yml index b3eb8f79a43..6a51d2a8578 100644 --- a/.github/workflows/test-unit-proxy-endpoints.yml +++ b/.github/workflows/test-unit-proxy-endpoints.yml @@ -7,14 +7,18 @@ on: - litellm_internal_staging - litellm_oss_staging - "litellm_**" + push: + branches: + - main + - litellm_internal_staging workflow_dispatch: permissions: contents: read concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: proxy-endpoints: diff --git a/.github/workflows/test-unit-proxy-infra.yml b/.github/workflows/test-unit-proxy-infra.yml index 884d62289b9..913653a1711 100644 --- a/.github/workflows/test-unit-proxy-infra.yml +++ b/.github/workflows/test-unit-proxy-infra.yml @@ -7,6 +7,10 @@ on: - litellm_internal_staging - litellm_oss_staging - "litellm_**" + push: + branches: + - main + - litellm_internal_staging permissions: contents: read @@ -14,8 +18,8 @@ permissions: pull-requests: write concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: proxy-infra: diff --git a/.github/workflows/test-unit-proxy-legacy.yml b/.github/workflows/test-unit-proxy-legacy.yml index bcbf365babf..49aa5f9f51d 100644 --- a/.github/workflows/test-unit-proxy-legacy.yml +++ b/.github/workflows/test-unit-proxy-legacy.yml @@ -7,13 +7,17 @@ on: - litellm_internal_staging - litellm_oss_staging - "litellm_**" + push: + branches: + - main + - litellm_internal_staging permissions: contents: read concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: test: diff --git a/.github/workflows/test-unit-responses-caching-types.yml b/.github/workflows/test-unit-responses-caching-types.yml index 2f177587997..5b336452069 100644 --- a/.github/workflows/test-unit-responses-caching-types.yml +++ b/.github/workflows/test-unit-responses-caching-types.yml @@ -7,6 +7,10 @@ on: - litellm_internal_staging - litellm_oss_staging - "litellm_**" + push: + branches: + - main + - litellm_internal_staging permissions: contents: read @@ -14,8 +18,8 @@ permissions: pull-requests: write concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: responses-caching-types: