Repository navigation
57 lines (48 loc) · 1.87 KB
/
Copy pathci.yml
File metadata and controls
57 lines (48 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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
# The build inlines NEXT_PUBLIC_* into the binary, and the smoke test runs
# it with a clean environment, so these must be set for the build step.
# Not keys: the schema only needs non-empty strings.
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: ci-not-a-key
NEXT_PUBLIC_POSTHOG_HOST_URL: https://us.i.posthog.com
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: ci-not-a-key
NEXT_PUBLIC_STRIPE_CUSTOMER_PORTAL: https://billing.stripe.com/p/login/test
NEXT_PUBLIC_WEB_PORT: '3000'
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
- name: Build Freebuff binary
run: bun freebuff/cli/build.ts 0.0.0-ci
- name: Smoke test Freebuff binary
run: |
chmod +x cli/bin/freebuff
cli/bin/freebuff --version
bun cli/scripts/smoke-binary.ts cli/bin/freebuff