Skip to content

LiteLLM Integration + Type Fixing + Usage Tracking + Testing #47

LiteLLM Integration + Type Fixing + Usage Tracking + Testing

LiteLLM Integration + Type Fixing + Usage Tracking + Testing #47

Workflow file for this run

name: Tests and Linting
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
ruff_lint:
name: Ruff Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff==0.7.2
- name: Run ruff
run: ruff check .
mypy:
name: Type Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy==1.13.0
pip install -r requirements.txt
pip install -e .
- name: Run mypy
run: mypy lotus/
test:
name: Python Tests
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
pip install pytest
- name: Set OpenAI API Key
run: echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> $GITHUB_ENV
- name: Run Python tests
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
pytest .github/tests/lm_tests.py
pytest .github/tests/rm_tests.py