Repository navigation
75 lines (62 loc) · 2.84 KB
/
Copy pathdocument-renderer-test.yml
File metadata and controls
75 lines (62 loc) · 2.84 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
name: document-renderer test
# Unit tests for @transitrix/document-renderer — the `.ttrs` recipe
# parser and its pass 1 deterministic resolver. Deterministic, no API key and no
# model: pass 1 runs with no agent present by design, so the whole suite is a
# plain Node run.
#
# The pass-1 suite renders the committed worked recipe
# (packages/document-renderer/tests/fixtures/product.mrd.ttrs) end-to-end against
# its fixture repository, and covers the no-repository cases, the named failures,
# and re-run byte-stability.
#
# The conformance suite diffs that render against the frozen
# fixtures/product.mrd.expected.md — this package is the reference
# implementation of notations/views/documents/DIRECTIVE_LANGUAGE.md, and the
# frozen output is what an independent implementation checks itself against. It
# never regenerates the fixture; a failure is a regression or a deliberate,
# separately reviewed re-freeze.
#
# Pass 2, the run record and PDF output are agent-free too: pass 2 takes the
# agent as a caller-supplied `fill` hook (never calling one itself); the run
# record is a pure function over its inputs; and PDF output is a hand-rolled,
# dependency-free Markdown-to-PDF writer (no external tool, no npm dependency)
# — every check in this workflow runs unconditionally, nothing is skipped for
# lack of an installed binary.
on:
pull_request:
paths:
- 'packages/document-renderer/**'
- 'notations/CONTRACT.md'
- '.github/workflows/document-renderer-test.yml'
workflow_dispatch:
schedule:
# Mondays 10:30 UTC — weekly safety net, offset from the other Monday crons.
- cron: '30 10 * * 1'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Run recipe-parser tests
run: node packages/document-renderer/tests/test_parse_recipe.mjs
- name: Run pass-1 resolver tests
run: node packages/document-renderer/tests/test_pass1.mjs
- name: Run conformance tests (frozen fixture)
run: node packages/document-renderer/tests/test_conformance.mjs
- name: Run pass-2 tests (instruction-slot filling)
run: node packages/document-renderer/tests/test_pass2.mjs
- name: Run run-record tests
run: node packages/document-renderer/tests/test_run_record.mjs
- name: Run PDF-output tests
run: node packages/document-renderer/tests/test_render_pdf.mjs
- name: Run full-run end-to-end test
run: node packages/document-renderer/tests/test_full_run.mjs
- name: Run paged-media CSS tests
run: node packages/document-renderer/tests/test_paged_media_css.mjs
- name: Run snapshot caption tests
run: node packages/document-renderer/tests/test_render_vivliostyle.mjs