: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(ci): install only turbo for backend test discovery (#104850)
Raúl Negrón-Oterof3ff1b5c6949
diff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.ymlindex ed1f53cbbca3..71d5b8115da5 100644--- a/.depot/workflows/ci-backend.yml+++ b/.depot/workflows/ci-backend.yml@@ -785,11 +785,12 @@ jobs:client-id: ${{ vars.GH_APP_POSTHOG_DEVEX_GENERAL_APP_ID }}private-key: ${{ secrets.GH_APP_POSTHOG_DEVEX_GENERAL_PRIVATE_KEY }}skip-token-revoke: true- - name: Install pnpm dependencies- uses: ./.depot/actions/pnpm-install+ - name: Set up pnpm and Node+ uses: ./.depot/actions/setup-pnpmwith:- install-command: pnpm install --frozen-lockfile --filter=@posthog/roottoken: ${{ steps.setup-gh-token.outputs.token || github.token }}+ - name: Install turbo+ uses: ./.depot/actions/setup-turbo# turbo-discover.js runs .github/scripts/tach_map.py under `uv run# --no-project` for the dependent cascade; the script pins tach, so no# Python project sync is needed. A missing uv widens the cascade todiff --git a/.github/scripts/turbo-discover.js b/.github/scripts/turbo-discover.jsindex afc206b7e3dc..a788650d1348 100644--- a/.github/scripts/turbo-discover.js+++ b/.github/scripts/turbo-discover.js@@ -174,7 +174,9 @@ const DJANGO_MIN_SHARDS = 3const DJANGO_MAX_SHARDS = 50const TURBO_EXEC_OPTS = { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'], maxBuffer: 50 * 1024 * 1024 }-const TURBO_BIN = './node_modules/.bin/turbo'+// CI puts turbo on PATH without installing the workspace. A local checkout has it installed.+const LOCAL_TURBO_BIN = './node_modules/.bin/turbo'+const TURBO_BIN = fs.existsSync(LOCAL_TURBO_BIN) ? LOCAL_TURBO_BIN : 'turbo'function runTurbo(args) {return execFileSync(TURBO_BIN, args, TURBO_EXEC_OPTS)diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.ymlindex 71366a313780..e96d171900fd 100644--- a/.github/workflows/ci-backend.yml+++ b/.github/workflows/ci-backend.yml@@ -678,12 +678,16 @@ jobs:private-key: ${{ secrets.GH_APP_POSTHOG_DEVEX_GENERAL_PRIVATE_KEY }}skip-token-revoke: true- - name: Install pnpm dependencies- uses: ./.github/actions/pnpm-install+ # turbo-discover.js needs Node and the turbo binary, not the installed workspace.+ - name: Set up pnpm and Node+ uses: ./.github/actions/setup-pnpmwith:- install-command: pnpm install --frozen-lockfile --filter=@posthog/roottoken: ${{ steps.setup-gh-token.outputs.token || github.token }}+ # Needs pnpm from the step above.+ - name: Install turbo+ uses: ./.github/actions/setup-turbo+# turbo-discover.js runs .github/scripts/tach_map.py under `uv run# --no-project` for the dependent cascade; the script pins tach, so no# Python project sync is needed. A missing uv widens the cascade to