diff --git a/.github/workflows/go-ci-windows.yml b/.github/workflows/go-ci-windows.yml index cfcf71d8..df1abae8 100644 --- a/.github/workflows/go-ci-windows.yml +++ b/.github/workflows/go-ci-windows.yml @@ -3,9 +3,25 @@ name: Windows CI on: push: branches: [ "main" ] + # only run when backend source changes + # cmd/ is excluded because it contains utilities without tests + paths: + - '**/*.go' + - '!cmd/**' + - 'go.mod' + - 'go.sum' + - 'Makefile' + - '.github/workflows/go-ci-windows.yml' pull_request: branches: [ "main" ] + paths: + - '**/*.go' + - '!cmd/**' + - 'go.mod' + - 'go.sum' + - 'Makefile' + - '.github/workflows/go-ci-windows.yml' # Allows manual triggering of the workflow workflow_dispatch: diff --git a/.github/workflows/go-ci.yml b/.github/workflows/go-ci.yml index 4dc1b90c..aa51b1bf 100644 --- a/.github/workflows/go-ci.yml +++ b/.github/workflows/go-ci.yml @@ -3,9 +3,25 @@ name: Linux CI on: push: branches: [ "main" ] + # only run when backend source changes + # cmd/ is excluded because it contains utilities without tests + paths: + - '**/*.go' + - '!cmd/**' + - 'go.mod' + - 'go.sum' + - 'Makefile' + - '.github/workflows/go-ci.yml' pull_request: branches: [ "main" ] + paths: + - '**/*.go' + - '!cmd/**' + - 'go.mod' + - 'go.sum' + - 'Makefile' + - '.github/workflows/go-ci.yml' # Allows manual triggering of the workflow workflow_dispatch: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 14a3534f..1c4c119c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: "23" + node-version: "24" - name: Install dependencies and build UI run: | cd ui-svelte diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml new file mode 100644 index 00000000..235f7b4a --- /dev/null +++ b/.github/workflows/ui-tests.yml @@ -0,0 +1,42 @@ +name: UI Tests + +on: + push: + branches: [ "main" ] + paths: + - 'ui-svelte/**' + - '.github/workflows/ui-tests.yml' + + pull_request: + branches: [ "main" ] + paths: + - 'ui-svelte/**' + - '.github/workflows/ui-tests.yml' + + workflow_dispatch: + +jobs: + + run-tests: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ui-svelte + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '24' + cache: 'npm' + cache-dependency-path: ui-svelte/package-lock.json + + - name: Install dependencies + run: npm ci + + - name: Type check + run: npm run check + + - name: Run tests + run: npm test diff --git a/ui-svelte/src/components/playground/SpeechInterface.svelte b/ui-svelte/src/components/playground/SpeechInterface.svelte index 2b9f4ae7..e9ab20a8 100644 --- a/ui-svelte/src/components/playground/SpeechInterface.svelte +++ b/ui-svelte/src/components/playground/SpeechInterface.svelte @@ -12,7 +12,6 @@ let inputText = $state(""); let isGenerating = $state(false); let generatedAudioUrl = $state(null); - let generatedText = $state(null); let generatedVoice = $state(null); let generatedTimestamp = $state(null); let error = $state(null); @@ -148,7 +147,6 @@ // Create object URL for the audio blob and store metadata generatedAudioUrl = URL.createObjectURL(audioBlob); - generatedText = trimmedText; generatedVoice = $selectedVoiceStore; generatedTimestamp = new Date(); } catch (err) { @@ -167,18 +165,6 @@ abortController?.abort(); } - function clearAudio() { - if (generatedAudioUrl) { - URL.revokeObjectURL(generatedAudioUrl); - } - generatedAudioUrl = null; - generatedText = null; - generatedVoice = null; - generatedTimestamp = null; - error = null; - inputText = ""; - } - function clearInput() { inputText = ""; }