Files
edentext/.github/workflows/ci.yml
T
Steffen Becker 1e88427154 test: semantic package lint, LO style resolution, cross-format rendering
Three legs against the closed-loop blind spot the duplicate-style bug
exposed: package-lint.test.ts checks invariants the schemas cannot
express (unique style ids/names, dangling style/num/rel references,
balanced ranges, manifest completeness); lo-roundtrip gains a
soffice→fodt leg asserting the styles LibreOffice resolves (Heading
chain Arial/bold/sizes, Word defaults); lo-render-consistency.test.ts
renders the kitchen sink from both formats through LibreOffice and
compares pagination and pixels (ratchet thresholds). CI's LO job
gains poppler-utils; test:lo runs both LO files.
2026-08-30 10:05:43 +00:00

62 lines
2.1 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
check-and-test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
# CLAUDE.md is read at every session start; detail belongs in the nested files.
- run: test "$(wc -l < CLAUDE.md)" -le 120 || { echo "CLAUDE.md over its 120-line budget"; exit 1; }
# The corpus is gitignored, so a test reading it would name a document and fail here.
- run: |
! git grep -l "render-parity/fixtures" -- src tests ':!tests/render-parity' \
|| { echo "a test reads the gitignored parity corpus"; exit 1; }
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run check
# xmllint drives the schema-validation leg (it self-skips without it).
- run: sudo apt-get install -y --no-install-recommends libxml2-utils
# LibreOffice is not installed here, so the lo-roundtrip suite self-skips
# (the lo-roundtrip job below runs that leg).
- run: npm test
# The re-save-through-LibreOffice leg, which self-skips everywhere soffice is absent.
lo-roundtrip:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
# poppler-utils rasterizes the PDFs the render-consistency leg compares.
- run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libreoffice-writer fonts-liberation poppler-utils
- run: npm ci
- run: npm run test:lo
# Production build booted in headless Chromium — catches bundling and boot
# regressions the jsdom suite cannot see.
smoke:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npx playwright-core install chromium
- run: npm run build
- run: npm run test:smoke