-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (54 loc) · 2.19 KB
/
tutorial.yml
File metadata and controls
67 lines (54 loc) · 2.19 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
name: tutorial-render
on:
push:
branches: [main]
pull_request:
jobs:
render-and-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
r-version: '4.5.2'
use-public-rspm: true
- name: Install proxymix from GitHub
run: |
install.packages('remotes')
remotes::install_github('max578/proxymix',
upgrade = 'never',
build_vignettes = FALSE)
install.packages(c('jsonlite', 'digest'))
shell: Rscript {0}
- name: Re-run precompute pipeline
run: Rscript scripts/precompute_states.R
- name: Verify states (structure + tolerance, not byte-equality)
run: Rscript scripts/verify_states.R
- uses: quarto-dev/quarto-actions/setup@v2
- name: Render
run: quarto render proxymix_tutorial.qmd
- name: Size budget (< 3 MB; KaTeX font triplication dominant)
run: |
BYTES=$(stat -c%s proxymix_tutorial.html 2>/dev/null \
|| stat -f%z proxymix_tutorial.html)
echo "Rendered HTML: $BYTES bytes ($((BYTES/1024)) KB)"
test "$BYTES" -lt 3145728
- name: No-remote-asset grep (offline-survivable property)
run: |
! grep -qE 'cdn\.jsdelivr\.net|fonts\.googleapis|mathjax\.rstudio\.com|unpkg\.com|cdnjs\.cloudflare\.com' proxymix_tutorial.html
- name: Dial + widget controls present (structural grep)
run: |
grep -q 'id="depth"' proxymix_tutorial.html
grep -q 'id="show-code"' proxymix_tutorial.html
grep -q 'id="run-live-r"' proxymix_tutorial.html
grep -q 'id="banana-K"' proxymix_tutorial.html
grep -q 'id="observe-y"' proxymix_tutorial.html
grep -q 'id="observe-sigma"' proxymix_tutorial.html
- uses: actions/setup-node@v4
with: { node-version: '20' }
- name: Playwright install
run: |
npm install --no-save playwright
npx playwright install --with-deps chromium
- name: Playwright smoke test (browser-level behaviour)
run: node tests/smoke.js