Skip to content

chore: version packages #1943

chore: version packages

chore: version packages #1943

Workflow file for this run

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