Skip to content

Commit a41b0f0

Browse files
committed
ci: add GitHub Actions workflow for build, typecheck, and test
Runs on push to main and pull requests. Build and typecheck are required to pass; tests are non-blocking for now since some integration tests depend on external services not yet configured in CI.
1 parent fa127ba commit a41b0f0

1 file changed

Lines changed: 70 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
# Cancel in-progress runs for the same PR/branch when new commits land
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
name: Build & Typecheck
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 20
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: 9.15.9
28+
29+
- name: Setup Node.js
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: 20
33+
cache: pnpm
34+
35+
- name: Install dependencies
36+
run: pnpm install --frozen-lockfile
37+
38+
- name: Typecheck
39+
run: pnpm typecheck
40+
41+
- name: Build
42+
run: pnpm build
43+
44+
test:
45+
name: Test
46+
runs-on: ubuntu-latest
47+
timeout-minutes: 20
48+
needs: build
49+
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v4
53+
54+
- name: Setup pnpm
55+
uses: pnpm/action-setup@v4
56+
with:
57+
version: 9.15.9
58+
59+
- name: Setup Node.js
60+
uses: actions/setup-node@v4
61+
with:
62+
node-version: 20
63+
cache: pnpm
64+
65+
- name: Install dependencies
66+
run: pnpm install --frozen-lockfile
67+
68+
- name: Run tests
69+
run: pnpm test
70+
continue-on-error: true

0 commit comments

Comments
 (0)