Skip to content

docs: prettier-format api.html to match docs/ convention #157

docs: prettier-format api.html to match docs/ convention

docs: prettier-format api.html to match docs/ convention #157

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22]
steps:
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Lint
run: npm run lint
- name: Check formatting
run: npm run format:check
- name: Test
run: npm test
# ── ODF Spec Validation ───────────────────────────────────────────────
#
# Downloads the OASIS ODF Validator jar (cached between runs) and
# validates a comprehensive fixture document generated by odf-kit.
# The build fails if the validator reports any spec errors.
- name: Cache ODF Validator jar
id: cache-validator
uses: actions/cache@v5
with:
path: .cache/odfvalidator.jar
key: odfvalidator-0.12.0
- name: Download ODF Validator
if: steps.cache-validator.outputs.cache-hit != 'true'
run: |
mkdir -p .cache
curl -sSL -o .cache/odfvalidator.jar \
"https://repo1.maven.org/maven2/org/odftoolkit/odfvalidator/0.12.0/odfvalidator-0.12.0-jar-with-dependencies.jar"
- name: Generate validator fixture
run: node scripts/generate-validator-fixture.mjs
- name: Validate fixture against ODF spec
run: |
OUTPUT=$(java -jar .cache/odfvalidator.jar validator-fixture.odt 2>&1)
echo "$OUTPUT"
if echo "$OUTPUT" | grep -qi "error"; then
echo ""
echo "❌ ODF validation failed — spec errors detected in generated output."
exit 1
fi
echo "✅ ODF validation passed."