Repository navigation
88 lines (70 loc) · 2.39 KB
/
Copy pathtest.yml
File metadata and controls
88 lines (70 loc) · 2.39 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# T023/T028: 单测 + lint + 构建 + Playwright 冒烟 CI
# on PR + push develop
name: test
on:
pull_request:
push:
branches: [develop]
jobs:
# ── 单测 + lint + 构建 ─────────────────────────────────────────────────────
unit:
name: typecheck / lint / test / build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install (frozen lockfile)
run: pnpm install --frozen-lockfile
- name: Typecheck
run: pnpm typecheck
- name: Lint
run: pnpm lint
- name: Format check
run: pnpm format:check
- name: Unit tests (with coverage)
run: pnpm test:coverage
# Boundary self-check (ESLint Node API) runs uninstrumented: under v8
# coverage the type-aware lint engine is ~12x slower and starves the
# vitest reporter RPC (onTaskUpdate timeout). Coverage adds no value for
# this enforcement spec, so it runs as its own fast step.
- name: Boundary self-check (no coverage)
run: pnpm test:boundary
- name: Build web
run: pnpm -F @gocell/web build
# ── Playwright 冒烟(shell + 主题切换,无后端依赖) ─────────────────────────
e2e:
name: Playwright smoke
runs-on: ubuntu-latest
needs: unit
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install (frozen lockfile)
run: pnpm install --frozen-lockfile
- name: Install Playwright browsers (chromium only)
run: pnpm exec playwright install --with-deps chromium
- name: Run E2E smoke tests
run: pnpm test:e2e
env:
CI: true
- name: Upload Playwright report on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
retention-days: 7