Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/framework-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ jobs:
name: Static + content checks
runs-on: ubuntu-latest
continue-on-error: true
# Bounds a hung `Install chromium` / apt-get step (observed stuck 30+ min
# with no failure — GitHub's default job timeout is 6 hours) so the run
# fails fast instead of sitting until that default kicks in.
timeout-minutes: 15
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
Expand Down Expand Up @@ -116,6 +120,23 @@ jobs:
working-directory: docs-theme-extras
run: npm ci

# ubuntu-latest resolves apt's default mirror to a region-specific
# azure.archive.ubuntu.com endpoint that has repeatedly gone unreachable
# outright (apt-get update stalls on endless "Ign:" retries instead of
# failing) — same root cause as the timeout guard above. Point apt at
# the direct global mirror before Playwright's installer shells out to
# apt-get, instead of just waiting longer.
- name: Work around flaky azure.archive.ubuntu.com apt mirror
run: |
sudo sed -i 's|azure\.archive\.ubuntu\.com|archive.ubuntu.com|g' \
/etc/apt/sources.list \
/etc/apt/sources.list.d/*.sources \
/etc/apt/apt-mirrors.txt 2>/dev/null || true

- name: Install chromium
working-directory: docs-theme-extras
run: npx playwright install --with-deps chromium

- name: Run static + content specs
working-directory: docs-theme-extras
env:
Expand Down
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ FRAMEWORK_EXTRAS_DIR ?= ../docs-theme-extras

# One-time install: npm packages + Playwright browser binaries in the harness
# checkout. ~120-180 MB, ~1-3 minutes.
# Serving the HTML report binds a port and BLOCKS until interrupted, so it must
# never run unattended: in CI it hangs the job, and in any scripted/non-tty run
# it hangs the caller. Gate it on an interactive terminal AND the absence of CI.
# The report is still written to playwright-report/ either way — view it with
# `make framework-test-report`.
SHOW_REPORT = if [ -t 1 ] && [ -z "$$CI" ]; then npx playwright show-report; fi

.PHONY: framework-test-install
framework-test-install:
@if [ ! -d "$(FRAMEWORK_EXTRAS_DIR)" ]; then \
Expand All @@ -60,7 +67,7 @@ framework-test:
hugo160 --gc --minify > .build.log 2>&1
cd $(FRAMEWORK_EXTRAS_DIR) && \
(DOCS_TEST_CONFIG=$(abspath ./.docs-test.toml) npx playwright test; \
result=$$?; npx playwright show-report; exit $$result)
result=$$?; $(SHOW_REPORT); exit $$result)

# Fastest loop — static specs only, no browser launch.
.PHONY: framework-test-static
Expand All @@ -70,7 +77,7 @@ framework-test-static:
hugo160 --gc --minify > .build.log 2>&1
cd $(FRAMEWORK_EXTRAS_DIR) && \
(DOCS_TEST_CONFIG=$(abspath ./.docs-test.toml) npx playwright test --project=static; \
result=$$?; npx playwright show-report; exit $$result)
result=$$?; $(SHOW_REPORT); exit $$result)

# Chromium browser specs (tabs, mermaid, theme toggle, copy-md, console errors,
# viewport, contrast).
Expand All @@ -81,7 +88,7 @@ framework-test-browser:
hugo160 --gc --minify > .build.log 2>&1
cd $(FRAMEWORK_EXTRAS_DIR) && \
(DOCS_TEST_CONFIG=$(abspath ./.docs-test.toml) npx playwright test --project=browser; \
result=$$?; npx playwright show-report; exit $$result)
result=$$?; $(SHOW_REPORT); exit $$result)

# Cross-browser desktop specs across chromium, firefox, and webkit.
.PHONY: framework-test-cross-browser
Expand All @@ -94,7 +101,7 @@ framework-test-cross-browser:
--project=cross-browser-chromium \
--project=cross-browser-firefox \
--project=cross-browser-webkit; \
result=$$?; npx playwright show-report; exit $$result)
result=$$?; $(SHOW_REPORT); exit $$result)

# Open the most recent Playwright HTML report.
.PHONY: framework-test-report
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ go 1.25.1
// docs-theme-extras declares the hextra import itself (pinned to v0.12.3), so
// hextra is a transitive dependency and is not listed here — matching
// agentgateway / kgateway / ambientmesh. Its checksums stay in go.sum.
require github.com/solo-io/docs-theme-extras v0.1.25 // indirect
require github.com/solo-io/docs-theme-extras v0.2.0 // indirect
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/solo-io/docs-theme-extras v0.1.25 h1:9SvHWXlrBxgk3/0NnV+JvkqQ7/rww4daIzdCYtSubVg=
github.com/solo-io/docs-theme-extras v0.1.25/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg=
github.com/solo-io/docs-theme-extras v0.2.0 h1:GShYCtM7oUC3UqHOqCPwPzsKe9jKdA1OXC0LVqo+h7w=
github.com/solo-io/docs-theme-extras v0.2.0/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg=
Loading