feat: models test and fixes

This commit is contained in:
leonardotrapani
2026-02-02 01:13:33 +01:00
parent 2729882b9d
commit 195f9f5115
34 changed files with 507 additions and 154 deletions
+2 -1
View File
@@ -6,7 +6,8 @@ on:
branches: [main, develop]
pull_request:
branches: [main, develop]
workflow_call: {} # <-- makes this workflow reusable
workflow_dispatch: {} # manual trigger
workflow_call: {} # reusable workflow
jobs:
test:
+61
View File
@@ -0,0 +1,61 @@
# .github/workflows/e2e.yml
name: E2E Tests
on:
workflow_dispatch:
inputs:
timeout:
description: 'Per-model timeout (e.g. 60s)'
required: false
default: '60s'
jobs:
test-models:
name: Test All Models
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
pkg-config \
libasound2-dev \
libpulse-dev \
libpipewire-0.3-dev
- name: Download dependencies
run: go mod download
- name: Build binary
env:
CGO_ENABLED: 1
run: go build -o hyprvoice ./cmd/hyprvoice
- name: Run test-models
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
DEEPGRAM_API_KEY: ${{ secrets.DEEPGRAM_API_KEY }}
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
ELEVENLABS_API_KEY: ${{ secrets.ELEVENLABS_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
run: |
./hyprvoice test-models \
--timeout=${{ inputs.timeout }} \
--output=test-models-report.json
- name: Upload report
uses: actions/upload-artifact@v4
if: always()
with:
name: test-models-report
path: test-models-report.json
retention-days: 30