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): block on the frontend stylesheet import check (#126838)

Paul D'Ambrad16df311f1b4
diff --git a/.github/workflows/ci-frontend.yml b/.github/workflows/ci-frontend.yml
index 0f4bf069b8ac..18f271d51e01 100644
--- a/.github/workflows/ci-frontend.yml
+++ b/.github/workflows/ci-frontend.yml
@@ -832,12 +832,14 @@ jobs:
- name: Validate SetupTaskId completions
run: node bin/validate-setup-tasks.mjs
- # Warn-only until the baseline has settled on master; then drop continue-on-error.
+ # continue-on-error keeps the cached schema check below running; the last step of this job
+ # turns a failure here into the job's verdict.
- name: Check frontend stylesheet imports
+ id: css-coupling
continue-on-error: true
run: |
- if [ ! -f frontend/bin/check-css-coupling.mjs ]; then
- echo "Skipping frontend stylesheet import check, script not present on this checkout"
+ if [ ! -f frontend/bin/check-css-coupling.mjs ] || [ ! -f frontend/bin/css-coupling-baseline.txt ]; then
+ echo "Skipping frontend stylesheet import check, script or baseline not present on this checkout"
exit 0
fi
node frontend/bin/check-css-coupling.mjs
@@ -882,6 +884,12 @@ jobs:
echo "::error::This PR removes fields that cached query responses can still hold. Apply the cache-impact-deprecated, cache-impact-accepted or cache-impact-bumped label, then re-run this job. The job summary lists the cost of each option."
exit 1
+ - name: Fail on frontend stylesheet import check
+ if: ${{ !cancelled() && steps.css-coupling.outcome == 'failure' }}
+ run: |
+ echo "::error::The frontend stylesheet import check failed. Read the log of the 'Check frontend stylesheet imports' step for each new coupling or fixed baseline entry, and the command that fixes it."
+ exit 1
+
jest:
runs-on: ubuntu-24.04
# PRs run as many selective shards as the tests reachable from the changed