Repository navigation
66 lines (54 loc) · 1.81 KB
/
Copy pathweb.yml
File metadata and controls
66 lines (54 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Web CI
# Typecheck + lint + unit-test the Next.js app on every push/PR that touches
# the frontend tree. The app lives under web/ (its own package.json, tsconfig,
# and bun.lock), so every step runs with `working-directory: web`. Move-only
# changes don't trigger this (path filter); the Move package is gated by
# move.yml instead.
on:
push:
branches: [main]
paths: [web/**, .github/workflows/web.yml]
pull_request:
paths: [web/**, .github/workflows/web.yml]
concurrency:
group: web-ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
web:
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v7
# Pin bun + Node so CI is reproducible (mirrors move.yml's pinned
# SUI_VERSION). Bump these deliberately, in lockstep with the toolchain.
# node-version stays 24 to match the Vercel runtime (project nodeVersion 24.x).
- name: Set up bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- name: Set up Node
uses: actions/setup-node@v7
with:
node-version: 24
# Cache bun's global module store, keyed on the frozen lockfile.
- name: Cache bun install (~/.bun/install/cache)
uses: actions/cache@v6
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('web/bun.lock') }}
restore-keys: |
bun-${{ runner.os }}-
- name: Install dependencies
run: bun install --frozen-lockfile
# Primary gate (per CLAUDE.md): typecheck with the project tsconfig.
- name: Typecheck
run: bunx tsc --noEmit
- name: Lint
run: bun run lint
- name: Unit tests (vitest)
run: bun run test