Handy/.github/workflows/test.yml
Josh Ribakoff a033a67b13
fix: run Rust tests in CI (#671)
* fix: run Rust tests in CI

Fixes #670

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: run Rust tests in CI

Adds a separate test.yml workflow to run existing Rust unit tests.

Fixes #670

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: use mock TranscriptionManager in CI tests

Swap to a mock adapter during CI to avoid compiling whisper/Vulkan.
The mock has the same interface but no heavy dependencies.
Existing tests don't exercise transcription code, so this is safe.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 11:18:50 +08:00

24 lines
719 B
YAML

name: "test"
on: [pull_request]
jobs:
rust-tests:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev libasound2-dev libssl-dev
- name: Use mock TranscriptionManager (CI only)
working-directory: src-tauri
run: |
# Swap to mock adapter - avoids compiling whisper/Vulkan
cp src/managers/transcription_mock.rs src/managers/transcription.rs
sed -i '/^transcribe-rs/d' Cargo.toml
- name: Run Rust tests
working-directory: src-tauri
run: cargo test