name: Tests
on:
workflow_dispatch:
workflow_call:
push:
branches: [ main ]
pull_request_target:
types: [labeled]
jobs:
test:
name: ✅ Test and build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install ALSA development libraries
run: sudo apt-get update && sudo apt-get install -y libasound2-dev
- run: rustup update
- run: cargo clippy --all --all-targets --all-features
- run: cargo test
- run: cargo build --release
- name: Run tests
if: (github.event_name == 'pull_request_target' && github.event.label.name == 'test') || github.event_name == 'push'
run: cargo test
env:
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
XAI_API_KEY: ${{ secrets.XAI_API_KEY }}
- run: cargo build --release