feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment
Some checks failed
CI Pipeline / Code Quality & Typecheck (push) Waiting to run
CI Pipeline / Test Suite (macos-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (ubuntu-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (windows-latest) (push) Blocked by required conditions
CI Pipeline / Build Validation (admin) (push) Blocked by required conditions
CI Pipeline / Build Validation (desktop) (push) Blocked by required conditions
Deploy Landing Page / deploy (push) Blocked by required conditions
Deploy Landing Page / build (push) Waiting to run
Release & Packaging Pipeline / Build & Publish Admin Docker Image (push) Failing after 8s
Release & Code Signing CA Pipeline / build-and-sign-windows (push) Failing after 1m51s
Build macOS / Build & Package (macOS) (push) Failing after 4s
Build macOS / Build & Package (macOS)-1 (push) Failing after 5s
Release & Code Signing CA Pipeline / build-and-sign-macos (push) Failing after 3s
Release & Packaging Pipeline / Package macOS Desktop App (push) Failing after 4s
Release & Packaging Pipeline / Package Windows Desktop App (push) Failing after 2m28s
Release & Packaging Pipeline / Publish Official GitHub Release (push) Has been skipped
Some checks failed
CI Pipeline / Code Quality & Typecheck (push) Waiting to run
CI Pipeline / Test Suite (macos-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (ubuntu-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (windows-latest) (push) Blocked by required conditions
CI Pipeline / Build Validation (admin) (push) Blocked by required conditions
CI Pipeline / Build Validation (desktop) (push) Blocked by required conditions
Deploy Landing Page / deploy (push) Blocked by required conditions
Deploy Landing Page / build (push) Waiting to run
Release & Packaging Pipeline / Build & Publish Admin Docker Image (push) Failing after 8s
Release & Code Signing CA Pipeline / build-and-sign-windows (push) Failing after 1m51s
Build macOS / Build & Package (macOS) (push) Failing after 4s
Build macOS / Build & Package (macOS)-1 (push) Failing after 5s
Release & Code Signing CA Pipeline / build-and-sign-macos (push) Failing after 3s
Release & Packaging Pipeline / Package macOS Desktop App (push) Failing after 4s
Release & Packaging Pipeline / Package Windows Desktop App (push) Failing after 2m28s
Release & Packaging Pipeline / Publish Official GitHub Release (push) Has been skipped
This commit is contained in:
parent
5cd1de6859
commit
708e20f747
406 changed files with 42464 additions and 6199 deletions
|
|
@ -2,6 +2,7 @@
|
|||
// 상태 머신 전이 + 이중 조건 플러시 + accidentalPress 테스트
|
||||
|
||||
import { describe, it, expect, beforeEach, vi } from 'vitest'
|
||||
import { EventEmitter } from 'events'
|
||||
import { RecognitionState, AudioState } from '@d3ro/core/types'
|
||||
import { TIMING } from '@d3ro/core/constants'
|
||||
|
||||
|
|
@ -30,14 +31,20 @@ const mockSTT = {
|
|||
}
|
||||
|
||||
vi.mock('../../../src/main/services/LocalSTTService', () => ({
|
||||
getLocalSTTService: () => mockSTT
|
||||
getLocalSTTService: () => mockSTT,
|
||||
resetLocalSTTServiceForTests: () => undefined,
|
||||
}))
|
||||
|
||||
const audioBus = new EventEmitter()
|
||||
const mockAudio = {
|
||||
start: vi.fn(() => Promise.resolve()),
|
||||
stop: vi.fn(() => Promise.resolve()),
|
||||
on: vi.fn(),
|
||||
off: vi.fn()
|
||||
on: vi.fn((ev: string, fn: (...args: unknown[]) => void) => {
|
||||
audioBus.on(ev, fn)
|
||||
}),
|
||||
off: vi.fn((ev: string, fn: (...args: unknown[]) => void) => {
|
||||
audioBus.off(ev, fn)
|
||||
}),
|
||||
}
|
||||
|
||||
vi.mock('../../../src/main/services/AudioCaptureService', () => ({
|
||||
|
|
@ -89,7 +96,18 @@ let getVoiceModeService: () => ReturnType<typeof import('../../../src/main/servi
|
|||
beforeEach(async () => {
|
||||
vi.resetModules()
|
||||
vi.clearAllMocks()
|
||||
audioBus.removeAllListeners()
|
||||
mockSTT.initialize.mockResolvedValue(undefined as never)
|
||||
mockSTT.transcribe.mockResolvedValue({
|
||||
text: '테스트 전사',
|
||||
segments: [],
|
||||
language: 'ko',
|
||||
duration: 2,
|
||||
processingTime: 500,
|
||||
} as never)
|
||||
mockLLM.processText.mockResolvedValue('다듬어진 텍스트' as never)
|
||||
const mod = await import('../../../src/main/services/VoiceModeService')
|
||||
mod.resetVoiceModeServiceForTests()
|
||||
getVoiceModeService = mod.getVoiceModeService
|
||||
})
|
||||
|
||||
|
|
@ -146,6 +164,49 @@ describe('VoiceModeService', () => {
|
|||
})
|
||||
})
|
||||
|
||||
describe('STT 준비 대기', () => {
|
||||
it('전사가 시작된 뒤에는 readiness timeout 으로 세션을 취소하지 않는다', async () => {
|
||||
let resolveInit: (() => void) | undefined
|
||||
mockSTT.initialize.mockImplementation(
|
||||
() =>
|
||||
new Promise<void>((resolve) => {
|
||||
resolveInit = resolve
|
||||
}),
|
||||
)
|
||||
mockSTT.transcribe.mockResolvedValue({
|
||||
text: '안녕하세요',
|
||||
segments: [],
|
||||
language: 'ko',
|
||||
duration: 2,
|
||||
processingTime: 50,
|
||||
} as never)
|
||||
|
||||
const svc = getVoiceModeService()
|
||||
let cancelReason: string | null = null
|
||||
let completed = false
|
||||
svc.on('session-cancelled', (payload: { reason: string }) => {
|
||||
cancelReason = payload.reason
|
||||
})
|
||||
const completedPromise = new Promise<void>((resolve) => {
|
||||
svc.once('session-completed', () => {
|
||||
completed = true
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
|
||||
await svc.startSession('dictation')
|
||||
audioBus.emit('audio-data', { buffer: Buffer.alloc(16000 * 2) })
|
||||
await new Promise((r) => setTimeout(r, 850))
|
||||
await svc.stopSession()
|
||||
|
||||
resolveInit?.()
|
||||
await Promise.race([completedPromise, new Promise((r) => setTimeout(r, 1000))])
|
||||
|
||||
expect(cancelReason).not.toBe('timeout')
|
||||
expect(completed).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
describe('cancelSession', () => {
|
||||
it('user 취소로 세션을 종료한다', async () => {
|
||||
const svc = getVoiceModeService()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue