|
| 1 | +name: Public CI |
| 2 | + |
| 3 | +# Build and smoke-test the exported public tree on every PR. |
| 4 | +# |
| 5 | +# This workflow was written alongside the export scripts but never reached the |
| 6 | +# public repo: it sat in scripts/public-export/github-workflows/, which neither |
| 7 | +# the manifest nor sync-public-repo.sh reads. The repo therefore had no CI at |
| 8 | +# all while CONTRIBUTING.md claimed "Public CI validates the exported public |
| 9 | +# packages". Moving it under public-export/root/ is what actually ships it. |
| 10 | + |
| 11 | +on: |
| 12 | + push: |
| 13 | + branches: [main] |
| 14 | + pull_request: |
| 15 | + branches: [main] |
| 16 | + |
| 17 | +concurrency: |
| 18 | + group: public-ci-${{ github.workflow }}-${{ github.ref }} |
| 19 | + cancel-in-progress: true |
| 20 | + |
| 21 | +jobs: |
| 22 | + build-and-test: |
| 23 | + runs-on: ubuntu-latest |
| 24 | + timeout-minutes: 30 |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v6 |
| 27 | + |
| 28 | + - uses: oven-sh/setup-bun@v2 |
| 29 | + with: |
| 30 | + bun-version-file: .bun-version |
| 31 | + |
| 32 | + - name: Install dependencies |
| 33 | + run: bun install --frozen-lockfile |
| 34 | + |
| 35 | + - name: Build SDK |
| 36 | + run: bun run build:sdk |
| 37 | + |
| 38 | + - name: Build Freebuff binary |
| 39 | + run: bun freebuff/cli/build.ts 0.0.0-ci |
| 40 | + |
| 41 | + - name: Smoke test Freebuff binary |
| 42 | + env: |
| 43 | + NEXT_PUBLIC_CB_ENVIRONMENT: prod |
| 44 | + NEXT_PUBLIC_CODEBUFF_APP_URL: https://codebuff.com |
| 45 | + NEXT_PUBLIC_SUPPORT_EMAIL: support@codebuff.com |
| 46 | + NEXT_PUBLIC_POSTHOG_API_KEY: phc_public_placeholder |
| 47 | + NEXT_PUBLIC_POSTHOG_HOST_URL: https://us.i.posthog.com |
| 48 | + NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: pk_test_placeholder |
| 49 | + NEXT_PUBLIC_STRIPE_CUSTOMER_PORTAL: https://billing.stripe.com/p/login/test |
| 50 | + NEXT_PUBLIC_WEB_PORT: '3000' |
| 51 | + run: | |
| 52 | + chmod +x cli/bin/freebuff |
| 53 | + cli/bin/freebuff --version |
| 54 | + bun cli/scripts/smoke-binary.ts cli/bin/freebuff |
0 commit comments