Skip to content

Merge pull request #149 from iautolab/fix/pyright-errors-and-ci #352

Merge pull request #149 from iautolab/fix/pyright-errors-and-ci

Merge pull request #149 from iautolab/fix/pyright-errors-and-ci #352

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: CI
on:
push:
branches: [ "master", "dev" ]
pull_request:
branches: [ "master" ]
jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: [ "3.11", "3.12", "3.13", "3.14" ]
os: [ windows-latest, ubuntu-latest ]
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
OPENLRC_TEST_LLM_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
OPENLRC_TEST_LIVE_API: "1"
OPENLRC_LOG_LEVEL: "DEBUG"
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
activate-environment: true
# - name: Install dependencies
# run: |
# poetry lock --no-update
# poetry install
# poetry run pip uninstall -y faster-whisper
# poetry run pip install "faster-whisper @ https://github.com/SYSTRAN/faster-whisper/archive/8327d8cc647266ed66f6cd878cf97eccface7351.tar.gz"
# - name: Install extra dependencies
# run: |
# poetry run pip install --force-reinstall torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
# poetry run pip install -U typing-extensions
- name: Install ffmpeg
uses: FedericoCarboni/setup-ffmpeg@v2
id: setup-ffmpeg
- name: Test with pytest
run: |
uv run --extra full --extra litellm pytest
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@v6
with:
python-version: "3.11"
enable-cache: true
- name: Install dev dependencies
# --all-extras: pyright analyzes optional imports (litellm, dpdfnet, etc.)
run: uv sync --group dev --all-extras
- name: Type check with pyright
run: uv run pyright openlrc/
- name: Lint with ruff
run: uv run ruff check openlrc/ tests/
- name: Check formatting with ruff
run: uv run ruff format --check openlrc/ tests/