Skip to content

ldb

ldb #60

Workflow file for this run

name: Python Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
pip install aiofiles pytest pytest-asyncio
- name: Setup test environment
run: |
# Create config directory if it doesn't exist
mkdir -p config
# Create basic config.yaml in config directory
echo "models:
default:
provider: openai
model: gpt-4o-mini
api_key: sk-test
gpt-4:
provider: openai
model: gpt-4
api_key: sk-test
" > config/config.yaml
# Create basic .env file in config directory
echo "DEFAULT_API_KEY=dummy-key
DEFAULT_BASE_URL=https://api.openai.com/v1
DEFAULT_MODEL=gpt-3.5-turbo" > config/.env
- name: Run tests without LLM integration
run: |
PYTHONPATH=$PYTHONPATH:$(pwd) pytest -v -m "not llm_integration"
# - name: Run all tests including LLM integration
# if: github.event_name == 'push' && github.ref == 'refs/heads/main'
# env:
# DEFAULT_API_KEY: ${{ secrets.DEFAULT_API_KEY }}
# DEFAULT_BASE_URL: ${{ secrets.DEFAULT_BASE_URL }}
# DEFAULT_MODEL: ${{ secrets.DEFAULT_MODEL }}
# run: pytest -v