Commit Graph
6 Commits
Author SHA1 Message Date
codingetandCodex ec0a53e4d0 fix(ci): require built WASM artifacts for tests
CI / typecheck (pull_request) Successful in 1m53s
CI / node-tests (pull_request) Successful in 1m55s
CI / typetest (pull_request) Successful in 1m57s
CI / browser-tests (pull_request) Successful in 3m30s
CI / format (pull_request) Successful in 1m11s
CI / lint (pull_request) Successful in 1m14s
CI / install (pull_request) Successful in 5m22s
Co-Authored-By: GPT-5.6 Terra <noreply@openai.com>
2026-07-11 13:41:04 +00:00
codinget 6471558e18 ci: don't run CI on main branch, it's guaranteed to have run earlier via PRs
CI / format (pull_request) Successful in 1m32s
CI / lint (pull_request) Successful in 1m35s
CI / install (pull_request) Successful in 4m30s
CI / typecheck (pull_request) Successful in 1m13s
CI / typetest (pull_request) Successful in 1m19s
CI / node-tests (pull_request) Successful in 1m19s
CI / browser-tests (pull_request) Successful in 2m40s
2026-07-04 01:23:50 +02:00
codingetandClaude 1aa26fd33e ci: consolidate workflows, build once per run
CI / lint (pull_request) Successful in 1m24s
CI / format (pull_request) Successful in 1m26s
CI / install (pull_request) Successful in 4m16s
CI / typetest (pull_request) Successful in 1m0s
CI / typecheck (pull_request) Successful in 1m29s
CI / browser-tests (pull_request) Successful in 2m48s
CI / node-tests (pull_request) Successful in 28s
CI / format (push) Successful in 1m6s
CI / lint (push) Successful in 1m6s
CI / install (push) Successful in 4m33s
CI / typecheck (push) Successful in 1m40s
CI / typetest (push) Successful in 1m42s
CI / node-tests (push) Successful in 1m38s
CI / browser-tests (push) Successful in 3m11s
Every job in the old checks.yml/test-node.yml/test-browser.yml
independently repeated checkout + tailscale submodule clone + npm ci,
and 5 of 7 also independently rebuilt the whole workspace via Turbo.
There was no caching anywhere.

Live smoke tests against this Gitea instance found actions/cache
(and setup-node's built-in cache: npm, same API) times out against
the built-in cache proxy - a server-side issue, not fixable from
workflow YAML - and actions/upload-artifact/download-artifact v4
refuse to run at all (GHES detection). v3 of the artifact actions
work correctly, so they're used as the handoff mechanism instead.

.gitea/workflows/checks.yml, test-node.yml, and test-browser.yml are
merged into one ci.yml. A new `install` job does the real work once
(submodule clone, npm ci, build) and hands node_modules plus Turbo's
local cache off via v3 artifacts to typecheck/typetest/node-tests/
browser-tests (all `needs: install`), instead of every job reinstalling
and rebuilding from scratch. lint/format never touched the submodule
or build output, so they drop that step and stay independent for fast
feedback. The shared checkout+submodule+setup-node preamble is now a
composite action, .gitea/actions/setup/action.yml (composite actions
require the repo to already be checked out, so actions/checkout stays
a separate first step in every job). A concurrency group cancels
superseded runs on the same ref.

The node_modules archive step must include per-package node_modules
overrides, not just the root: packages/xml and packages/vfs pin a
newer local TypeScript than the workspace root, installed by npm as
nested packages/{xml,vfs}/node_modules/typescript. Missing those in
the archive caused those two packages to silently typecheck against
the wrong TypeScript version.

Cross-run caching (reusing a previous run's install/build) isn't
available until the Gitea instance's cache backend is fixed
server-side - that's a separate, out-of-scope follow-up.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-03 22:40:24 +00:00
codingetandClaude 13c25e6f4d ci: add lint, format, typecheck, typetest, and build workflows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 23:51:51 +00:00
codinget a1081a8194 test: setup node tests in CI 2026-06-23 22:13:38 +00:00
codingetandClaude c89c478286 feat(test): add browser integration testing with Playwright
Uses Playwright as a library within node:test (not @playwright/test) to
keep the same runner and script conventions. Browser test files use the
*.browser.ts extension so the existing src/**/*.test.ts glob picks up zero
browser tests, leaving the regular test suite unaffected.

Key pieces:
- .npmrc: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 prevents binary downloads on
  npm ci; browsers are installed explicitly in CI via playwright install
- @webnet/browser-test-utils: new private package exporting forBrowsers()
  (iterates chromium + firefox, handles browser lifecycle within node:test
  suite/before/after) and a serveDirectory() helper (minimal http.createServer
  that serves a built dist/ or out/ directory so the browser can fetch ES
  modules via dynamic import())
- test:browser / test:browser:coverage scripts added to transport, vfs,
  tsconnect following the same c8 + lcov pattern as test:coverage
- turbo.json: test:browser and test:browser:coverage tasks depend on build +
  ^build (dist/ must exist before the browser can import from it)
- .gitea/workflows/test-browser.yml: CI pipeline that installs browsers with
  --with-deps then runs npm run test:browser

Integration tests:
- DataChannelTransport: real RTCPeerConnection loopback (both peers in one
  page context), exercises send/receive and close propagation
- FsaVFS: OPFS round-trip (writeFile/readFile), stat, readdir, delete
- IndexedDBState: multi-instance persistence (write via instance 1, open
  fresh instance 2 and verify IDB round-trip), empty-DB initialisation
- FsaFileOps: write/read/stat/remove cycle and rename/listFiles over OPFS

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 12:47:30 +00:00