Repository navigation
cli: append streamed root text once per flush, not once per delta #11481
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Public CI | |
| # Build and smoke-test the exported public tree on every PR. | |
| # | |
| # This workflow was written alongside the export scripts but never reached the | |
| # public repo: it sat in scripts/public-export/github-workflows/, which neither | |
| # the manifest nor sync-public-repo.sh reads. The repo therefore had no CI at | |
| # all while CONTRIBUTING.md claimed "Public CI validates the exported public | |
| # packages". Moving it under public-export/root/ is what actually ships it. | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: public-ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version-file: .bun-version | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build SDK | |
| run: bun run build:sdk | |
| # Green has to mean the suites ran. Until these two steps existed, this | |
| # workflow only built and smoke-tested, so a red test suite and a green | |
| # check were the same thing. | |
| - name: Typecheck | |
| run: | | |
| bun run --cwd=cli typecheck | |
| bun run --cwd=sdk typecheck | |
| - name: Test | |
| run: | | |
| bun run --cwd=cli test | |
| bun run --cwd=sdk test | |
| - name: Build Freebuff binary | |
| # The compiled binary inlines NEXT_PUBLIC_* at build time, so the values | |
| # must be present HERE, not only when the binary is run: with an empty | |
| # build environment they are baked in as undefined and every later | |
| # invocation dies in the env schema (smoke-binary.ts documents the same | |
| # contract from the probe side). | |
| env: | |
| NEXT_PUBLIC_CB_ENVIRONMENT: prod | |
| NEXT_PUBLIC_CODEBUFF_APP_URL: https://codebuff.com | |
| NEXT_PUBLIC_SUPPORT_EMAIL: support@freebuff.com | |
| NEXT_PUBLIC_POSTHOG_API_KEY: phc_public_placeholder | |
| NEXT_PUBLIC_POSTHOG_HOST_URL: https://us.i.posthog.com | |
| NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: pk_test_placeholder | |
| NEXT_PUBLIC_STRIPE_CUSTOMER_PORTAL: https://billing.stripe.com/p/login/test | |
| NEXT_PUBLIC_WEB_PORT: '3000' | |
| run: bun freebuff/cli/build.ts 0.0.0-ci | |
| - name: Smoke test Freebuff binary | |
| env: | |
| NEXT_PUBLIC_CB_ENVIRONMENT: prod | |
| NEXT_PUBLIC_CODEBUFF_APP_URL: https://codebuff.com | |
| NEXT_PUBLIC_SUPPORT_EMAIL: support@freebuff.com | |
| NEXT_PUBLIC_POSTHOG_API_KEY: phc_public_placeholder | |
| NEXT_PUBLIC_POSTHOG_HOST_URL: https://us.i.posthog.com | |
| NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: pk_test_placeholder | |
| NEXT_PUBLIC_STRIPE_CUSTOMER_PORTAL: https://billing.stripe.com/p/login/test | |
| NEXT_PUBLIC_WEB_PORT: '3000' | |
| run: | | |
| chmod +x cli/bin/freebuff | |
| cli/bin/freebuff --version | |
| bun cli/scripts/smoke-binary.ts cli/bin/freebuff |