fix(ci): unblock headless test runs and manage Forgejo secrets from .env

- desktop: mock @nut-tree-fork/nut-js in the shared Vitest setup; template
  tests reached the real TextInsertService and libnut killed the worker on the
  display-less Linux runner ("Could not open main display").
- mobile: the knowledge realtime test now unsubscribes, so the deletion
  reconcile interval no longer keeps Jest alive forever.
- set-forgejo-secrets.mjs syncs every Forgejo secret from the root .env and
  refuses local URLs; SUPABASE_URL had been registered as 127.0.0.1:55321, so
  payple-renew never succeeded.
This commit is contained in:
Yun Chan 2026-10-11 11:14:56 +09:00
parent 3cac14f668
commit a7c0d6fb21
5 changed files with 98 additions and 59 deletions

View file

@ -102,6 +102,23 @@ vi.mock('uiohook-napi', () => ({
}),
}))
// nut-js 도 같은 이유로 막는다. 네이티브 libnut 은 X 디스플레이가 없으면 "Could not open
// main display" 를 찍고 워커 프로세스를 죽인다(Linux 러너에서 템플릿 결과 삽입 경로가 실측
// "Worker exited unexpectedly"). nut-js 동작이 필요한 테스트는 파일에서 다시 vi.mock 한다.
vi.mock('@nut-tree-fork/nut-js', () => ({
keyboard: {
config: { autoDelayMs: 0 },
pressKey: vi.fn(async () => undefined),
releaseKey: vi.fn(async () => undefined),
type: vi.fn(async () => undefined),
},
providerRegistry: {
hasKeyboard: vi.fn(() => false),
getKeyboard: vi.fn(),
},
Key: new Proxy<Record<string, string>>({}, { get: (_target, property) => String(property) }),
}))
// WindowManager 모킹 — VoiceModeService가 import하므로 필요
vi.mock('../src/main/windows/WindowManager', () => ({
showRecordingTip: vi.fn(),