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

ci.yml

94 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 steps:
14 - name: Checkout
15 uses: actions/checkout@v6
16​
17 - name: Setup Bun
18 uses: oven-sh/setup-bun@v2
19 with:
20 bun-version-file: package.json
21​
22 - name: Setup Node
23 uses: actions/setup-node@v6
24 with:
25 node-version-file: package.json
26​
27 - name: Cache Bun and Turbo
28 uses: actions/cache@v5
29 with:
30 path: |
31 ~/.bun/install/cache
32 .turbo
33 key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}-${{ hashFiles('turbo.json') }}
34 restore-keys: |
35 ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}-
36​
37 - name: Cache Playwright browsers
38 uses: actions/cache@v5
39 with:
40 path: ~/.cache/ms-playwright
41 key: ${{ runner.os }}-playwright-${{ hashFiles('bun.lock') }}
42 restore-keys: |
43 ${{ runner.os }}-playwright-
44​
45 - name: Install dependencies
46 run: bun install --frozen-lockfile
47​
48 - name: Format
49 run: bun run fmt:check
50​
51 - name: Lint
52 run: bun run lint
53​
54 - name: Typecheck
55 run: bun run typecheck
56​
57 - name: Test
58 run: bun run test
59​
60 - name: Install browser test runtime
61 run: |
62 cd apps/web
63 bunx playwright install --with-deps chromium
64​
65 - name: Browser test
66 run: bun run --cwd apps/web test:browser
67​
68 - name: Build desktop pipeline
69 run: bun run build:desktop
70​
71 - name: Verify preload bundle output
72 run: |
73 test -f apps/desktop/dist-electron/preload.js
74 grep -nE "desktopBridge|getWsUrl|PICK_FOLDER_CHANNEL|wsUrl" apps/desktop/dist-electron/preload.js
75​
76 release_smoke:
77 name: Release Smoke
78 runs-on: ubuntu-24.04
79 steps:
80 - name: Checkout
81 uses: actions/checkout@v6
82​
83 - name: Setup Bun
84 uses: oven-sh/setup-bun@v2
85 with:
86 bun-version-file: package.json
87​
88 - name: Setup Node
89 uses: actions/setup-node@v6
90 with:
91 node-version-file: package.json
92​
93 - name: Exercise release-only workflow steps
94 run: node scripts/release-smoke.ts