Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(ci): skip backend test matrices on draft PRs (#60703)

Raúl Negrón-Oterobfa27ddfd936
diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml
index 90c8ab0c6c7c..69036ef63e4b 100644
--- a/.github/workflows/ci-backend.yml
+++ b/.github/workflows/ci-backend.yml
@@ -13,6 +13,11 @@ on:
description: ClickHouse server version. Leave blank for default
type: string
pull_request:
+ # Heavy test matrices (django, turbo-tests) skip drafts; ready_for_review
+ # re-triggers them when a PR leaves draft. To force them on a draft, add the
+ # `run-ci-backend` label — labeled/unlabeled re-trigger the run so the matrices
+ # start without needing a new push. Cheap checks still run on drafts.
+ types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
merge_group:
concurrency:
@@ -373,6 +378,8 @@ jobs:
needs: [changes, turbo-discover, detect-snapshot-mode]
if: >-
always() &&
+ (github.event.pull_request.draft != true ||
+ contains(github.event.pull_request.labels.*.name, 'run-ci-backend')) &&
needs.turbo-discover.result == 'success' &&
needs.turbo-discover.outputs.matrix != '[]' &&
needs.turbo-discover.outputs.matrix != ''
@@ -1503,6 +1510,8 @@ jobs:
# 3. OR turbo-discover itself failed (conservative: run Django on detection failure)
if: |
always() &&
+ (github.event.pull_request.draft != true ||
+ contains(github.event.pull_request.labels.*.name, 'run-ci-backend')) &&
needs.changes.outputs.backend == 'true' &&
needs.build_django_matrix.result == 'success' &&
(needs.changes.outputs.legacy == 'true' ||