-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (39 loc) · 1.38 KB
/
Copy pathci.yml
File metadata and controls
51 lines (39 loc) · 1.38 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
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Type-check (library)
run: pnpm type-check
- name: Lint (library)
run: pnpm lint
- name: Test (library)
run: pnpm test
- name: Build (library)
run: pnpm build
- name: Verify dist RSC boundaries
run: |
# Every 'use client' module in src must have a matching directive in dist,
# and RSC-authored modules must NOT be marked client.
SRC_COUNT=$(grep -rl "^'use client'" src --include='*.ts' --include='*.tsx' | grep -v '.test.' | wc -l)
DIST_COUNT=$(grep -rl '^"use client"' dist --include='*.js' | wc -l)
echo "src client modules: $SRC_COUNT, dist client modules: $DIST_COUNT"
test "$SRC_COUNT" -eq "$DIST_COUNT"
# Spot-check: a pure-presentational component must stay a server component
! head -1 dist/form/button.js | grep -q 'use client'
- name: Type-check (demo)
run: pnpm --filter adminlte-react-demo type-check
- name: Build (demo)
run: pnpm demo:build