mirror of
https://github.com/MervinPraison/PraisonAI.git
synced 2026-11-10 11:41:32 -10:00
45 lines
1.6 KiB
YAML
45 lines
1.6 KiB
YAML
name: Python Package (Multi-Version)
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 4 * * 1' # Weekly Monday 4am UTC
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Set environment variables
|
|
run: |
|
|
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY || 'sk-test-key-for-github-actions-testing-only-not-real' }}" >> $GITHUB_ENV
|
|
echo "OPENAI_API_BASE=${{ secrets.OPENAI_API_BASE || 'https://api.openai.com/v1' }}" >> $GITHUB_ENV
|
|
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME || 'gpt-5-nano' }}" >> $GITHUB_ENV
|
|
echo "PYTHONPATH=${{ github.workspace }}/src/praisonai-agents:$PYTHONPATH" >> $GITHUB_ENV
|
|
|
|
- name: Install dependencies
|
|
run: python -m pip install --upgrade pip
|
|
- uses: ./.github/actions/install-monorepo-packages
|
|
with:
|
|
wrapper-extras: ".[ui,gradio,api,agentops,google,openai,anthropic,cohere,chat,code,realtime,call,crewai,autogen]"
|
|
- name: Install test tools
|
|
run: |
|
|
python -m pip install duckduckgo_search pytest pytest-asyncio pytest-cov
|
|
python -m pip install "praisonaiagents[knowledge]"
|
|
|
|
- name: Run tests
|
|
run: |
|
|
cd src/praisonai && python -m pytest tests/unit/ -v --tb=short --disable-warnings --timeout=60
|