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

ci.yml

96 lines2.3 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-4vcpu-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: Format
50 run: bun run fmt:check
51​
52 - name: Lint
53 run: bun run lint
54​
55 - name: Typecheck
56 run: bun run typecheck
57​
58 - name: Test
59 run: bun run test
60​
61 - name: Install browser test runtime
62 run: |
63 cd apps/web
64 bunx playwright install --with-deps chromium
65​
66 - name: Browser test
67 run: bun run --cwd apps/web test:browser
68​
69 - name: Build desktop pipeline
70 run: bun run build:desktop
71​
72 - name: Verify preload bundle output
73 run: |
74 test -f apps/desktop/dist-electron/preload.js
75 grep -nE "desktopBridge|getWsUrl|PICK_FOLDER_CHANNEL|wsUrl" apps/desktop/dist-electron/preload.js
76​
77 release_smoke:
78 name: Release Smoke
79 runs-on: ubuntu-24.04
80 timeout-minutes: 10
81 steps:
82 - name: Checkout
83 uses: actions/checkout@v6
84​
85 - name: Setup Bun
86 uses: oven-sh/setup-bun@v2
87 with:
88 bun-version-file: package.json
89​
90 - name: Setup Node
91 uses: actions/setup-node@v6
92 with:
93 node-version-file: package.json
94​
95 - name: Exercise release-only workflow steps
96 run: node scripts/release-smoke.ts