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 depot shadow matrices on draft PRs (#60989)

Raúl Negrón-Oterod7611a7ef747
diff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.yml
index baac50f68f13..e0a022d94fad 100644
--- a/.depot/workflows/ci-backend.yml
+++ b/.depot/workflows/ci-backend.yml
@@ -35,6 +35,10 @@ 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. Add the `run-ci-backend` label
+ # (labeled/unlabeled re-trigger) to force them on a draft. Mirrors canonical.
+ types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -323,7 +327,7 @@ jobs:
turbo-tests:
needs: [changes, turbo-discover]
if: >-
- always() && needs.turbo-discover.result == 'success' && needs.turbo-discover.outputs.matrix != '[]' && needs.turbo-discover.outputs.matrix != ''
+ 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 != ''
runs-on: depot-ubuntu-latest
timeout-minutes: 60
name: Product tests (${{ matrix.group }})
@@ -751,6 +755,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' ||