Run the e2e suites locally in a Linux container #246

Merged
cruelacid merged 1 commit from worktree-e2e-container into main 2026-10-01 15:55:01 +01:00
Owner

Run natively, each Obsidian window the multi-vault suite opens takes the Mac's keyboard focus, so the machine cannot be used during a run. Electron has no headless mode. This adds packages/e2e/run-in-container.sh (pnpm e2e), which runs the same suite in Debian under Xvfb. That is CI's setup, so the UI is still rendered and driven for real.

  • packages/e2e/container/Dockerfile: Node 26 (pinned by digest), pnpm 12.5.1, and CI's apt list plus what the slim image lacks.
  • The checkout is mounted read-only and rsynced into a work volume, so the host's darwin node_modules are never touched. Uncommitted edits are included.
  • The fixed container name acts as a per-checkout lock, and the container has its own network namespace.
  • CLAUDE.md and the e2e README make the container the local default. test:e2e:multi is unchanged: it still runs natively, and CI calls it directly.

Verified locally: two-vaults.test.ts passed 10/10 in the container with no test Obsidian processes on the host. Breaking one assertion made the script exit 1, which also shows uncommitted edits reach the container. A second run from the same checkout was refused. The full suite passed in 370 s (147 passed, 2 skipped, the opt-in PROBE=1 probe), including first-run setup. pnpm test, pnpm -r typecheck and pnpm lint are green.

Not covered in the container, and stated in the README: the macOS keychain path in secret-storage.test.ts, which degrades exactly as on CI.

Task: NEC-192

Changelog

NONE

🤖 Generated with Claude Code

https://claude.ai/code/session_01NnpsVLx9NmMG2N2nJnA8mR

Run natively, each Obsidian window the multi-vault suite opens takes the Mac's keyboard focus, so the machine cannot be used during a run. Electron has no headless mode. This adds `packages/e2e/run-in-container.sh` (`pnpm e2e`), which runs the same suite in Debian under Xvfb. That is CI's setup, so the UI is still rendered and driven for real. - `packages/e2e/container/Dockerfile`: Node 26 (pinned by digest), pnpm 12.5.1, and CI's apt list plus what the slim image lacks. - The checkout is mounted read-only and rsynced into a work volume, so the host's darwin `node_modules` are never touched. Uncommitted edits are included. - The fixed container name acts as a per-checkout lock, and the container has its own network namespace. - CLAUDE.md and the e2e README make the container the local default. `test:e2e:multi` is unchanged: it still runs natively, and CI calls it directly. Verified locally: `two-vaults.test.ts` passed 10/10 in the container with no test Obsidian processes on the host. Breaking one assertion made the script exit 1, which also shows uncommitted edits reach the container. A second run from the same checkout was refused. The full suite passed in 370 s (147 passed, 2 skipped, the opt-in `PROBE=1` probe), including first-run setup. `pnpm test`, `pnpm -r typecheck` and `pnpm lint` are green. Not covered in the container, and stated in the README: the macOS keychain path in `secret-storage.test.ts`, which degrades exactly as on CI. Task: NEC-192 ## Changelog NONE 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01NnpsVLx9NmMG2N2nJnA8mR
Run the e2e suites locally in a Linux container
All checks were successful
Release note / release-note (pull_request) Successful in 15s
CI / build (pull_request) Successful in 5m38s
CI / e2e (pull_request) Successful in 7m41s
CI / promote (pull_request) Has been skipped
72fa406a03
Run natively, every Obsidian window the multi-vault suite opens takes the
Mac's keyboard focus, so the machine cannot be used until the run ends.
Electron has no headless mode. run-in-container.sh runs the same suite
in Debian under Xvfb, which is CI's setup, so real UI is still rendered
and driven without reaching the Mac's display.

`pnpm e2e` is now the default for a local run. `test:e2e:multi` is
unchanged and still runs natively, for the macOS keychain path and any
other claim about macOS. CI keeps calling it directly.

Task: NEC-192

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NnpsVLx9NmMG2N2nJnA8mR
cruelacid force-pushed worktree-e2e-container from 72fa406a03
All checks were successful
Release note / release-note (pull_request) Successful in 15s
CI / build (pull_request) Successful in 5m38s
CI / e2e (pull_request) Successful in 7m41s
CI / promote (pull_request) Has been skipped
to 5f9981081d
All checks were successful
Release note / release-note (pull_request) Successful in 19s
CI / build (pull_request) Successful in 5m24s
CI / e2e (pull_request) Successful in 7m36s
CI / promote (pull_request) Has been skipped
CI / build (push) Successful in 5m18s
CI / e2e (push) Successful in 7m26s
CI / promote (push) Successful in 32s
2026-10-01 15:47:00 +01:00
Compare
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Nectenda/nectenda!246
No description provided.