: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
ci: skip frontend & storybook CI for agent-platform-services-only PRs (#64887)
Ben White6661353d2219
diff --git a/.github/workflows/ci-frontend.yml b/.github/workflows/ci-frontend.ymlindex 136f9df6e2a6..adc7758a1d98 100644--- a/.github/workflows/ci-frontend.yml+++ b/.github/workflows/ci-frontend.yml@@ -31,8 +31,12 @@ jobs:timeout-minutes: 5name: Determine need to run frontend checksoutputs:- frontend: ${{ steps.filter.outputs.frontend || 'true' }}- frontend_code: ${{ steps.filter.outputs.frontend_code || 'true' }}+ # AND the broad filter with `exclude` (below): a PR that touches only+ # the Node-only agent-platform services/packages must not trigger+ # frontend CI — they have their own suite (ci-agents.yml) and are+ # excluded from jest (frontend/jest.config.ts) and the bundle.+ frontend: ${{ (steps.filter.outputs.frontend || 'true') == 'true' && (steps.exclude.outputs.outside_non_frontend_ts || 'true') == 'true' }}+ frontend_code: ${{ (steps.filter.outputs.frontend_code || 'true') == 'true' && (steps.exclude.outputs.outside_non_frontend_ts || 'true') == 'true' }}steps:# For pull requests it's not necessary to check out the code, but we# also want this to run on master, so we need to check out@@ -108,6 +112,29 @@ jobs:- webpack.config.js- stylelint*+ # Dirs that match the broad `frontend` rules above but aren't frontend+ # code — Node-only TS that has its own suite (ci-agents.yml) and isn't in+ # jest or the bundle. Appending a plain `!...` negation to the rules above+ # wouldn't help: dorny's default `some` quantifier OR-matches predicates,+ # so the broad `products/**/*.ts` rule still matches and the negation is+ # neutralized (same gotcha documented in+ # ci-migrations-service-separation-check.yml). A separate step is required+ # because `predicate-quantifier` is step-level: with `every`, this filter+ # is true only when some changed file lives OUTSIDE every excluded dir.+ # AND-ed into the outputs above so a PR touching only these dirs skips+ # frontend CI. To exclude another non-frontend dir, add a `!` line below —+ # the outputs reference this one filter, so they don't need to change.+ - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1+ id: exclude+ if: github.event_name != 'push'+ with:+ token: ${{ steps.app-token.outputs.token || github.token }}+ predicate-quantifier: 'every'+ filters: |+ outside_non_frontend_ts:+ - '!products/agent_platform/services/**'+ - '!products/agent_platform/packages/**'+# Pick which jest tests to run on draft PRs by passing changed files to# `jest --findRelatedTests` (jest's resolver walks the import graph for us).# Skipped on ready PRs, master push, and merge_group; the jest job falls backdiff --git a/.github/workflows/ci-storybook.yml b/.github/workflows/ci-storybook.ymlindex 52f232fe9d01..e8417a459f8f 100644--- a/.github/workflows/ci-storybook.yml+++ b/.github/workflows/ci-storybook.yml@@ -41,6 +41,7 @@ jobs:${{github.event_name == 'push'|| (steps.filter.outputs.frontend == 'true'+ && steps.exclude.outputs.outside_non_frontend_ts == 'true'&& fromJSON(steps.filter.outputs.frontend_count || '0')> fromJSON(steps.filter.outputs.frontend_generated_count || '0')&& !(github.event_name == 'pull_request'@@ -82,6 +83,29 @@ jobs:snapshots:- 'frontend/snapshots.yml'+ # The `frontend` filter's `products/**/*.{ts,tsx}` rule matches dirs that+ # aren't frontend code — Node-only TS (agent-platform services/packages)+ # with no stories and nothing in the bundle. Appending a plain `!...`+ # negation to that rule wouldn't help: dorny's default `some` quantifier+ # OR-matches predicates, so the broad rule still matches and the negation+ # is neutralized (same gotcha as the output comment above). A separate+ # step is required because `predicate-quantifier` is step-level: with+ # `every`, this filter is true only when some changed file lives OUTSIDE+ # every excluded dir. AND-ed into the `frontend` output so a PR touching+ # only these dirs skips the visual-regression suite. To exclude another+ # non-frontend dir, add a `!` line below — the output references this one+ # filter, so it doesn't need to change.+ - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1+ id: exclude+ if: github.event_name != 'push'+ with:+ token: ${{ steps.app-token.outputs.token || github.token }}+ predicate-quantifier: 'every'+ filters: |+ outside_non_frontend_ts:+ - '!products/agent_platform/services/**'+ - '!products/agent_platform/packages/**'+# Build the visual-regression matrix.# On PRs, only run chromium shards — no story currently opts into webkit snapshots# (see common/storybook/.storybook/test-runner.ts), so webkit shards consume CI