mirror of
https://github.com/Purple-Horizons/openclaw-voice.git
synced 2026-08-14 09:02:28 +00:00
- pyproject.toml with proper metadata and optional deps - GitHub Actions workflow: tests on Python 3.10-3.12 - Lint checks (ruff, black) - MIT License
75 lines
1.6 KiB
YAML
75 lines
1.6 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv venv
|
|
source .venv/bin/activate
|
|
uv pip install -e ".[dev,stt]"
|
|
|
|
- name: Run unit tests
|
|
run: |
|
|
source .venv/bin/activate
|
|
pytest tests/test_modules.py -v
|
|
|
|
- name: Run server tests
|
|
run: |
|
|
source .venv/bin/activate
|
|
pytest tests/test_server.py -v
|
|
env:
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv venv
|
|
source .venv/bin/activate
|
|
uv pip install ruff black
|
|
|
|
- name: Check formatting
|
|
run: |
|
|
source .venv/bin/activate
|
|
black --check src/ tests/
|
|
continue-on-error: true
|
|
|
|
- name: Lint
|
|
run: |
|
|
source .venv/bin/activate
|
|
ruff check src/ tests/
|
|
continue-on-error: true
|