Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

ci.yml

134 lines3.6 KB

1name: CI
2​
3on:
4 pull_request:
5 push:
6 branches:
7 - main
8​
9jobs:
10 quality:
11 name: Format, Lint, Typecheck, Test, Browser Test, Build
12 runs-on: blacksmith-8vcpu-ubuntu-2404
13 timeout-minutes: 10
14 steps:
15 - name: Checkout
16 uses: actions/checkout@v6
17​
18 - name: Setup Bun
19 uses: oven-sh/setup-bun@v2
20 with:
21 bun-version-file: package.json
22​
23 - name: Setup Node
24 uses: actions/setup-node@v6
25 with:
26 node-version-file: package.json
27​
28 - name: Cache Bun and Turbo
29 uses: actions/cache@v5
30 with:
31 path: |
32 ~/.bun/install/cache
33 .turbo
34 key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}-${{ hashFiles('turbo.json') }}
35 restore-keys: |
36 ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}-
37​
38 - name: Cache Playwright browsers
39 uses: actions/cache@v5
40 with:
41 path: ~/.cache/ms-playwright
42 key: ${{ runner.os }}-playwright-${{ hashFiles('bun.lock') }}
43 restore-keys: |
44 ${{ runner.os }}-playwright-
45​
46 - name: Install dependencies
47 run: bun install --frozen-lockfile
48​
49 - name: Ensure Electron runtime is installed
50 run: |
51 if ! node -e "require('./apps/desktop/node_modules/electron')" >/dev/null 2>&1; then
52 rm -rf apps/desktop/node_modules/electron/dist apps/desktop/node_modules/electron/path.txt
53 bun apps/desktop/node_modules/electron/install.js
54 fi
55 node -e "require('./apps/desktop/node_modules/electron')"
56​
57 - name: Format
58 run: bun run fmt:check
59​
60 - name: Lint
61 run: bun run lint
62​
63 - name: Typecheck
64 run: bun run typecheck
65​
66 - name: Test
67 run: bun run test
68​
69 - name: Install browser test runtime
70 run: |
71 cd apps/web
72 bunx playwright install --with-deps chromium
73​
74 - name: Browser test
75 run: bun run --cwd apps/web test:browser
76​
77 - name: Build desktop pipeline
78 run: bun run build:desktop
79​
80 - name: Verify preload bundle output
81 run: |
82 test -f apps/desktop/dist-electron/preload.cjs
83 grep -nE "desktopBridge|getLocalEnvironmentBootstrap|PICK_FOLDER_CHANNEL|wsUrl" apps/desktop/dist-electron/preload.cjs
84​
85 mobile_native_static_analysis:
86 name: Mobile Native Static Analysis
87 runs-on: blacksmith-12vcpu-macos-26
88 timeout-minutes: 10
89 steps:
90 - name: Checkout
91 uses: actions/checkout@v6
92​
93 - name: Setup Bun
94 uses: oven-sh/setup-bun@v2
95 with:
96 bun-version-file: package.json
97​
98 - name: Setup Node
99 uses: actions/setup-node@v6
100 with:
101 node-version-file: package.json
102​
103 - name: Install dependencies
104 run: bun install --frozen-lockfile
105​
106 - name: Install mobile native static analysis tools
107 run: brew bundle install --file apps/mobile/Brewfile
108​
109 - name: Lint mobile native sources
110 run: node scripts/mobile-native-static-check.ts
111​
112 release_smoke:
113 name: Release Smoke
114 runs-on: blacksmith-8vcpu-ubuntu-2404
115 timeout-minutes: 10
116 steps:
117 - name: Checkout
118 uses: actions/checkout@v6
119​
120 - name: Setup Bun
121 uses: oven-sh/setup-bun@v2
122 with:
123 bun-version-file: package.json
124​
125 - name: Setup Node
126 uses: actions/setup-node@v6
127 with:
128 node-version-file: package.json
129​
130 - name: Install dependencies
131 run: bun install --frozen-lockfile
132​
133 - name: Exercise release-only workflow steps
134 run: node scripts/release-smoke.ts