Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,16 @@ jobs:
export PYTHONPATH=$(python3 -c "import site; print(site.getsitepackages()[0])")
cargo test -p coldvox-app --test golden_master -- --nocapture

- name: Run Moonshine E2E Tests
if: matrix.rust-version == 'stable'
run: |
echo "=== Running Moonshine E2E Tests ==="
# Install Python dependencies for Moonshine
pip install transformers torch librosa accelerate
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Python dependencies are installed without version pinning, which can lead to non-reproducible builds and potential security issues if a dependency is compromised. Consider pinning versions (e.g., pip install transformers==4.36.0 torch==2.1.2 librosa==0.10.1 accelerate==0.25.0) or using a requirements file to ensure consistent test environments across runs.

Copilot uses AI. Check for mistakes.
export PYTHONPATH=$(python3 -c "import site; print(site.getsitepackages()[0])")
# Run the specific E2E test with the moonshine feature enabled
cargo test -p coldvox-stt --features moonshine --test moonshine_e2e -- --nocapture

# GUI groundwork check integrated here
- name: Detect and test Qt 6 GUI
if: matrix.rust-version == 'stable'
Expand Down
9 changes: 5 additions & 4 deletions crates/coldvox-text-injection/test-apps/gtk_test_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,20 @@ static void on_text_changed(GtkEditable *editable, gpointer user_data) {

// Create a ready file to signal that the app has started.
// This allows tests to detect when the app is ready without relying on text changes.
static void create_ready_file(void) {
static gboolean create_ready_file(gpointer user_data) {
char filepath[256];
snprintf(filepath, sizeof(filepath), "/tmp/coldvox_gtk_test_%d.txt", getpid());
FILE *f = fopen(filepath, "w");
if (f != NULL) {
// Write empty content - file existence is the signal
fclose(f);
}
return G_SOURCE_REMOVE; // Run once
}

int main(int argc, char *argv[]) {
gtk_init(&argc, &argv);

// Create the ready file immediately so tests know the app is running
create_ready_file();

// Create the main window
GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(window), "GTK Test App");
Expand All @@ -57,6 +55,9 @@ int main(int argc, char *argv[]) {
// Ensure the entry widget has focus when the window appears
gtk_widget_grab_focus(entry);

// Schedule ready file creation for when the main loop starts
g_idle_add(create_ready_file, NULL);

// Start the GTK main loop
gtk_main();

Expand Down
Loading
Loading