Skip to content

Commit 3dd6d79

Browse files
authored
feat: add CI pipeline with fmt, lint, typecheck, test, and build jobs (#16)
* feat: add CI pipeline with fmt, lint, typecheck, test, and build jobs - Add GitHub Actions workflow (.github/workflows/ci.yml) - 5 parallel jobs: fmt, lint, typecheck, test, build - Triggers on push to main, all PRs, and manual dispatch - Uses Bun for fast dependency installation - Total runtime: ~5 seconds - Add Prettier for code formatting - Config: 2 spaces, single quotes, 100 char width - Format all TypeScript, JSON, Markdown, HTML files - New scripts: fmt, fmt:fix - Add Biome for fast linting - Rust-based linter (100x faster than ESLint) - Custom rules for terminal emulator code - Allows escape sequences, non-null assertions - New scripts: lint, lint:fix - Update dependencies - Add @biomejs/biome@^1.9.4 - Add prettier@^3.3.3 - Format entire codebase with Prettier - Consistent style across all files - All CI checks passing locally All jobs validated: ✅ Format check: All files formatted ✅ Lint: No errors ✅ Type check: No TypeScript errors ✅ Tests: 88/88 passing ✅ Build: Successfully generates bundles * update ci names * fix: update biome lint:fix to use --write instead of deprecated --apply - Replace --apply with --write in lint:fix script - Fix implicit any type in demo/server/file-browser-server.ts
1 parent 2322b00 commit 3dd6d79

28 files changed

Lines changed: 2428 additions & 2027 deletions

.github/workflows/ci.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
fmt:
11+
name: fmt
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: oven-sh/setup-bun@v1
17+
with:
18+
bun-version: latest
19+
20+
- name: Install dependencies
21+
run: bun install
22+
23+
- name: Check formatting
24+
run: bun run fmt
25+
26+
lint:
27+
name: lint
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- uses: oven-sh/setup-bun@v1
33+
with:
34+
bun-version: latest
35+
36+
- name: Install dependencies
37+
run: bun install
38+
39+
- name: Run linter
40+
run: bun run lint
41+
42+
typecheck:
43+
name: type check
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- uses: oven-sh/setup-bun@v1
49+
with:
50+
bun-version: latest
51+
52+
- name: Install dependencies
53+
run: bun install
54+
55+
- name: Check types
56+
run: bun run typecheck
57+
58+
test:
59+
name: test
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
64+
- uses: oven-sh/setup-bun@v1
65+
with:
66+
bun-version: latest
67+
68+
- name: Install dependencies
69+
run: bun install
70+
71+
- name: Run tests
72+
run: bun test
73+
74+
build:
75+
name: build
76+
runs-on: ubuntu-latest
77+
steps:
78+
- uses: actions/checkout@v4
79+
80+
- uses: oven-sh/setup-bun@v1
81+
with:
82+
bun-version: latest
83+
84+
- name: Install dependencies
85+
run: bun install
86+
87+
- name: Build library
88+
run: bun run build

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules/
2+
dist/
3+
coverage/
4+
*.wasm
5+
.git/
6+
.vite/
7+
bun.lock

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"singleQuote": true,
3+
"semi": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 100,
7+
"arrowParens": "always"
8+
}

0 commit comments

Comments
 (0)