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

ci.yml

102 lines2.7 KB

1name: CI
2​
3on:
4 pull_request:
5 types: [opened, synchronize, reopened, labeled]
6 push:
7 branches:
8 - main
9​
10jobs:
11 quality:
12 runs-on: blacksmith-4vcpu-ubuntu-2404
13 # Only run on PRs from trusted authors (vouch:trusted label) or pushes to main.
14 # This prevents fork PRs from consuming Blacksmith minutes without maintainer approval.
15 if: >-
16 github.event_name == 'push' ||
17 contains(github.event.pull_request.labels.*.name, 'vouch:trusted')
18 steps:
19 - name: Checkout
20 uses: actions/checkout@v6
21​
22 - name: Setup Bun
23 uses: oven-sh/setup-bun@v2
24 with:
25 bun-version-file: package.json
26​
27 - name: Setup Node
28 uses: actions/setup-node@v6
29 with:
30 node-version-file: package.json
31​
32 - name: Cache Bun and Turbo
33 uses: actions/cache@v5
34 with:
35 path: |
36 ~/.bun/install/cache
37 .turbo
38 key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}-${{ hashFiles('turbo.json') }}
39 restore-keys: |
40 ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}-
41​
42 - name: Cache Playwright browsers
43 uses: actions/cache@v5
44 with:
45 path: ~/.cache/ms-playwright
46 key: ${{ runner.os }}-playwright-${{ hashFiles('bun.lock') }}
47 restore-keys: |
48 ${{ runner.os }}-playwright-
49​
50 - name: Install dependencies
51 run: bun install --frozen-lockfile
52​
53 - name: Format
54 run: bun run fmt:check
55​
56 - name: Lint
57 run: bun run lint
58​
59 - name: Typecheck
60 run: bun run typecheck
61​
62 - name: Test
63 run: bun run test
64​
65 - name: Install browser test runtime
66 run: |
67 cd apps/web
68 bunx playwright install --with-deps chromium
69​
70 - name: Browser test
71 run: bun run --cwd apps/web test:browser
72​
73 - name: Build desktop pipeline
74 run: bun run build:desktop
75​
76 - name: Verify preload bundle output
77 run: |
78 test -f apps/desktop/dist-electron/preload.js
79 grep -nE "desktopBridge|getWsUrl|PICK_FOLDER_CHANNEL|wsUrl" apps/desktop/dist-electron/preload.js
80​
81 release_smoke:
82 name: Release Smoke
83 runs-on: blacksmith-4vcpu-ubuntu-2404
84 if: >-
85 github.event_name == 'push' ||
86 contains(github.event.pull_request.labels.*.name, 'vouch:trusted')
87 steps:
88 - name: Checkout
89 uses: actions/checkout@v6
90​
91 - name: Setup Bun
92 uses: oven-sh/setup-bun@v2
93 with:
94 bun-version-file: package.json
95​
96 - name: Setup Node
97 uses: actions/setup-node@v6
98 with:
99 node-version-file: package.json
100​
101 - name: Exercise release-only workflow steps
102 run: node scripts/release-smoke.ts