Commit Graph

3 Commits

Author SHA1 Message Date
tiennm99 60c14917fb fix(ci): unbreak smoke + htmltest steps post v0.3.0
Three independent CI failures from run 25916500415:

1. Smoke test [linkToSection aria-label] fail on Hugo 0.146 leg.
   The assertion pinned to $post selected via `find ... | head -1`,
   which on 0.146 picked `doc-sach-quan-sat/index.html` — a post with
   zero h2/h3/h4 headings, so zero heading-anchor markup. Rewrite the
   check to scan all built post HTML (same pattern already in use for
   render-link rel). Now reports 13 matches on the demo build.

2. htmltest URLSwap silently never matched. The prior
   `^/tsuki/: /` config (added in d30f50f) used a regex anchor that
   doesn't match htmltest's substring evaluation against minified
   `href=/tsuki/...` attributes. Switch to the unanchored
   `"/tsuki/": /` form. CI has been failing on this since v0.2.0
   despite the "fix" commit; this is the real fix.

3. head.html referenced `/favicon.ico` and `/favicon.svg` but neither
   asset existed in exampleSite/static/. Add a minimal SVG favicon,
   drop the legacy .ico reference (modern browsers fall back to a
   site-rooted /favicon.ico by convention; sites needing one can
   override head.html). Switch the SVG link to `relURL` so the
   `/tsuki/` baseURL prefix is honoured under GitHub Pages subpath
   deploy.

Local validation: all 32 smoke checks green; favicon resolves to
`/tsuki/favicon.svg` and ships in the build artifact.
2026-05-15 20:18:26 +07:00
tiennm99 fdc91dbc8b test: expand smoke suite to 32 checks + Hugo CI matrix
scripts/smoke-tests.sh:
- Per-kind CSS budget (home/post/list/archives/search), each ≤ 4200 B gz
- theme-color light/dark meta tags
- aria-pressed SSR on theme-toggle
- breadcrumbs nav + BreadcrumbList JSON-LD presence on post,
  absence on home
- prev/next nav + rel=prev attribute
- linkToSection aria-label on heading anchors
- Speculation Rules absent by default
- llm.txt artifact present
- Pagefind UI preload-swap pattern on /search/
- Giscus preconnect gating (absent when comments disabled)
- Per-kind CSS bundle routing (home loads home.css but not single.css;
  post loads single.css but not home.css)
- code-copy.js gating (post loads it, home does not)

.github/workflows/pages.yml:
- Build matrix on Hugo 0.146.0 (theme.toml floor) + 0.154.0 (current).
  Smoke + htmltest run on both. Artifact upload + deploy gated on
  the current version only.
- Drop the redundant standalone CSS-budget step; smoke-tests.sh now
  enforces per-kind budgets.
2026-05-15 18:55:59 +07:00
tiennm99 944a6c8e1b ci: htmltest smoke tests and build validation
Add htmltest configuration, smoke test script, CSS budget assertion in CI
pipeline for quality gates.
2026-05-09 09:32:40 +07:00