-
Notifications
You must be signed in to change notification settings - Fork 6
184 lines (145 loc) · 6.44 KB
/
Copy pathci.yml
File metadata and controls
184 lines (145 loc) · 6.44 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
changeset:
name: Changeset present for published package src changes
# PR-only: needs a base branch to diff against. The bot's Version Packages
# PR touches no src, so this passes there without a special case.
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0 # need history to compute the merge base with main
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version-file: "package.json"
- name: Require a changeset (or an empty one) for published package src edits
run: bun scripts/check-changeset.ts
env:
CHANGESET_BASE_REF: origin/${{ github.base_ref }}
ci:
name: Lint, typecheck, test, build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version-file: "package.json"
- run: bun install --frozen-lockfile
# `--frozen-lockfile` above only checks that the dependency graph still
# satisfies bun.lock; it does not notice a workspace's cached "version"
# field drifting behind its package.json (a plain `bun install` doesn't
# rewrite that field either — only a full lockfile regenerate does). See
# scripts/check-lockfile-workspace-versions.ts for the incident this
# guards against.
- name: Lockfile workspace-version check
run: bun run check:lockfile-versions
- name: Lint
run: bun run lint
- name: Format check
run: bun run format:check
- name: i18n check
run: bun run check:i18n
- name: Adapter parity contract (React <-> Vue props/ref)
run: bun run check:parity-contract
- name: Adapter export parity (React <-> Vue public exports)
run: bun run check:export-parity
- name: React Compiler bailout guard
# The compiler skips some imperative ProseMirror/ref-heavy components.
# Guard their manual memoization so a cleanup cannot create render loops.
run: bun run check:react-compiler
- name: Typecheck
run: bun run typecheck
- name: Test
run: bun run test
- name: Build
run: bun run build
- name: API surface report
run: bun run api:check
- name: Validate dist
run: bun run validate-dist
interactions:
name: Interaction e2e (playground)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version-file: "package.json"
- run: bun install --frozen-lockfile
- name: Install Playwright Chromium
run: |
sudo rm -f \
/etc/apt/sources.list.d/azure-cli.list \
/etc/apt/sources.list.d/azure-cli.sources \
/etc/apt/sources.list.d/microsoft-prod.list \
/etc/apt/sources.list.d/microsoft-prod.sources
bunx playwright install --with-deps chromium
# Behaviour specs only (assert document content + editor state). The
# screenshot baselines (rendering.spec) and perf budgets
# (editing-performance.spec) are env-specific, so they are not run here;
# the `interactions` Playwright project starts the playground dev server
# via the config's webServer.
- name: Run interaction specs
run: bun run test:interactions
differential:
name: Differential parser parity (folio vs python-docx + Open XML SDK)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version-file: "package.json"
- uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
with:
dotnet-version: "8.0.x"
- run: bun install --frozen-lockfile
- name: Install python-docx (differential reference parser)
run: python3 -m pip install --break-system-packages python-docx
- name: Build Open XML SDK differential projector
run: dotnet build packages/core/scripts/differential/dotnet -c Release
# DIFFERENTIAL_REQUIRED turns a missing reference into a failure rather
# than a skip, so the full-corpus parity gate cannot silently pass.
- name: Differential parity (full corpus)
run: bun run test:differential
env:
DIFFERENTIAL_REQUIRED: "1"
packaged-consumer:
name: Packaged-consumer build (tarballs)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version-file: "package.json"
- run: bun install --frozen-lockfile
# Builds + packs both packages, installs the tarballs into a clean-room
# consumer OUTSIDE the workspace, and runs a production `vite build`. The
# playground e2e consumes SOURCE and so cannot catch a packaging
# regression (e.g. a worker `new URL(..., import.meta.url)` target the
# dist never emits); this build consumes the published TARBALLS.
- name: Production Vite build over packed tarballs
run: bun run test:packaged-consumer
- name: Install Playwright Chromium
run: |
sudo rm -f \
/etc/apt/sources.list.d/azure-cli.list \
/etc/apt/sources.list.d/azure-cli.sources \
/etc/apt/sources.list.d/microsoft-prod.list \
/etc/apt/sources.list.d/microsoft-prod.sources
bunx playwright install --with-deps chromium
# Runtime half of the same gate: serve the built consumer and drive it in a
# browser. Catches failures the build cannot see — a worker that resolves at
# build time but fails to spawn/execute, and UI strings missing from the
# shipped runtime catalog (IntlError: MISSING_MESSAGE).
- name: Runtime smoke over packed tarballs
run: bun run test:packaged-consumer-smoke