Build an EPUB 3 straight from markdown, and find the twelfth hazard d… #36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # CVER OSS shared delivery baseline — Node CI (dim 7). | |
| # Source template: ~/cver-oss-baseline/workflows/node-ci.yml | |
| # reepub builds a native Swift OCR CLI, so this runs on macOS. | |
| name: ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| ci: | |
| runs-on: macos-latest # reepub is darwin-only (native Vision OCR / Swift) | |
| steps: | |
| # v5 = the Node 24 action runtime. v4 runs on Node 20, which GitHub has | |
| # marked for removal; a deprecated runtime does not fail, it warns until | |
| # the day it stops. Siblings (signet/clikae/andross/shelfseer) are on v5. | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: "22" | |
| - name: Install dependencies | |
| run: | | |
| if [ -f package-lock.json ]; then | |
| npm ci | |
| else | |
| npm install --no-audit --no-fund | |
| fi | |
| # The conformance suite renders a cover with Playwright and holds the | |
| # finished book to the official epubcheck. Both are fetched here so the | |
| # pipeline checks exactly what scripts/test.sh checks locally. | |
| - name: Install Playwright chromium | |
| run: npx playwright install --with-deps chromium | |
| - name: Fetch epubcheck | |
| run: npm run epubcheck | |
| - name: Test | |
| run: npm test --if-present | |
| - name: Build (Swift OCR CLI) | |
| run: npm run build --if-present | |
| # The native macOS app is now an SwiftPM package (depends on Signet). | |
| # Build it and run the framework-free OCR→EPUB self-test. | |
| - name: Build + self-test macOS app (SwiftPM) | |
| run: cd macos && swift build && swift run ReepubSelfTest | |
| # Runs after the build because it drives the real binary. Nothing tested | |
| # this wire until 2026-08-02: the extraction rewrote the producing side and | |
| # every suite stayed green, because not one of them ran bin/scan-ocr. | |
| - name: scan-ocr ↔ builder.js wire contract | |
| run: node scripts/check-ocr-contract.mjs | |
| - name: Release readiness | |
| run: node scripts/check-release-readiness.mjs | |
| # These two ran only in the local pre-push hook until 2026-08-02, so a push | |
| # from a machine without the hook, or a pull request, never met them. The | |
| # selftest runs alongside the check on purpose: a guard that has never been | |
| # seen to fail tells you nothing, and a green tree is not the difference. | |
| # Reads no source: it removes playwright and sharp from module resolution | |
| # and runs the repair tools for real. "The imports look right" and "it | |
| # works without a browser" are different claims. | |
| - name: Optional boundary | |
| run: node scripts/check-optional-boundary.mjs | |
| - name: Package ledger | |
| run: | | |
| node scripts/check-packages.mjs | |
| node scripts/check-packages.mjs --selftest | |
| # book-md is the Swift half of the cross-parser gate, so it has to exist | |
| # before the gate runs. It is built here rather than left to the check | |
| # because the check refuses to skip itself when the binary is missing — | |
| # which is exactly how this step first went red: the pre-push hook passed | |
| # on a machine that happened to have .build/debug/book-md lying around. | |
| - name: Build book-md (Swift book-format parser) | |
| run: swift build --package-path packages/epub-kit --product book-md | |
| - name: Book-format corpus vs the ledger | |
| run: | | |
| node scripts/check-book-format.mjs | |
| node scripts/check-book-format.mjs --selftest | |
| - name: Shared rules (promised) and recorded differences | |
| run: node scripts/check-sync-markers.mjs |