v2.2.54 #61
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Comprehensive Test Suite | |
| on: | |
| workflow_dispatch: # Allow manual triggering | |
| inputs: | |
| test_type: | |
| description: 'Type of tests to run' | |
| required: true | |
| default: 'all' | |
| type: choice | |
| options: | |
| - all | |
| - unit | |
| - integration | |
| - fast | |
| - performance | |
| - frameworks | |
| - autogen | |
| - crewai | |
| release: | |
| types: [published, prereleased] | |
| schedule: | |
| # Run comprehensive tests weekly on Sundays at 3 AM UTC | |
| - cron: '0 3 * * 0' | |
| jobs: | |
| comprehensive-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11"] | |
| steps: | |
| - name: Checkout code | |
| 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 | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Install dependencies | |
| run: | | |
| cd src/praisonai | |
| uv pip install --system ."[ui,gradio,api,agentops,google,openai,anthropic,cohere,chat,code,realtime,call,crewai,autogen]" | |
| uv pip install --system duckduckgo_search | |
| uv pip install --system pytest pytest-asyncio pytest-cov pytest-benchmark | |
| # Install knowledge dependencies from praisonai-agents | |
| uv pip install --system "praisonaiagents[knowledge]" | |
| - 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-4o-mini' }}" >> $GITHUB_ENV | |
| - name: Run Comprehensive Test Suite | |
| run: | | |
| # Determine test type from input or default to 'all' | |
| TEST_TYPE="${{ github.event.inputs.test_type || 'all' }}" | |
| echo "π§ͺ Running comprehensive test suite (type: $TEST_TYPE)" | |
| case $TEST_TYPE in | |
| "unit") | |
| cd src/praisonai && python -m pytest tests/unit/ -v --tb=short --disable-warnings --cov=praisonai --cov-report=xml --cov-branch | |
| ;; | |
| "integration") | |
| cd src/praisonai && python -m pytest tests/integration/ -v --tb=short --disable-warnings --cov=praisonai --cov-report=xml --cov-branch | |
| ;; | |
| "fast") | |
| cd src/praisonai && python tests/test_runner.py --pattern fast | |
| ;; | |
| "performance") | |
| cd src/praisonai && python tests/test_runner.py --pattern "performance" | |
| ;; | |
| "frameworks") | |
| cd src/praisonai && python tests/test_runner.py --pattern frameworks | |
| ;; | |
| "autogen") | |
| cd src/praisonai && python tests/test_runner.py --pattern autogen | |
| ;; | |
| "crewai") | |
| cd src/praisonai && python tests/test_runner.py --pattern crewai | |
| ;; | |
| "all"|*) | |
| cd src/praisonai && python tests/test_runner.py --pattern all | |
| ;; | |
| esac | |
| - name: Generate Comprehensive Test Report | |
| if: always() | |
| run: | | |
| echo "# π Comprehensive Test Report" > comprehensive_report.md | |
| echo "" >> comprehensive_report.md | |
| echo "**Python Version:** ${{ matrix.python-version }}" >> comprehensive_report.md | |
| echo "**Test Type:** ${{ github.event.inputs.test_type || 'all' }}" >> comprehensive_report.md | |
| echo "**Trigger:** ${{ github.event_name }}" >> comprehensive_report.md | |
| echo "**Date:** $(date -u)" >> comprehensive_report.md | |
| echo "" >> comprehensive_report.md | |
| echo "## π§ͺ Test Categories Covered:" >> comprehensive_report.md | |
| echo "" >> comprehensive_report.md | |
| echo "### Unit Tests:" >> comprehensive_report.md | |
| echo "- β Core agent functionality" >> comprehensive_report.md | |
| echo "- β Async operations" >> comprehensive_report.md | |
| echo "- β Tool integrations" >> comprehensive_report.md | |
| echo "- β UI components" >> comprehensive_report.md | |
| echo "" >> comprehensive_report.md | |
| echo "### Integration Tests:" >> comprehensive_report.md | |
| echo "- β MCP (Model Context Protocol)" >> comprehensive_report.md | |
| echo "- β RAG (Retrieval Augmented Generation)" >> comprehensive_report.md | |
| echo "- β Base URL API mapping" >> comprehensive_report.md | |
| echo "- β Multi-agent workflows" >> comprehensive_report.md | |
| echo "- β AutoGen framework integration" >> comprehensive_report.md | |
| echo "- β CrewAI framework integration" >> comprehensive_report.md | |
| echo "- π¬ LLM integrations (OpenAI, Anthropic, etc.)" >> comprehensive_report.md | |
| echo "- π₯οΈ UI frameworks (Gradio, Streamlit)" >> comprehensive_report.md | |
| echo "- π Memory and persistence" >> comprehensive_report.md | |
| echo "- π Multi-modal capabilities" >> comprehensive_report.md | |
| echo "- β AutoGen framework integration" >> comprehensive_report.md | |
| echo "- β CrewAI framework integration" >> comprehensive_report.md | |
| echo "" >> comprehensive_report.md | |
| echo "### Key Features Tested:" >> comprehensive_report.md | |
| echo "- π€ Agent creation and configuration" >> comprehensive_report.md | |
| echo "- π Task management and execution" >> comprehensive_report.md | |
| echo "- π Sync/async workflows" >> comprehensive_report.md | |
| echo "- π οΈ Custom tools and error handling" >> comprehensive_report.md | |
| echo "- π§ Knowledge bases and RAG" >> comprehensive_report.md | |
| echo "- π MCP server connections" >> comprehensive_report.md | |
| echo "- π¬ LLM integrations (OpenAI, Anthropic, etc.)" >> comprehensive_report.md | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: src/praisonai/coverage.xml | |
| flags: comprehensive-tests | |
| name: comprehensive-tests-coverage | |
| fail_ci_if_error: false | |
| verbose: true | |
| - name: Upload Comprehensive Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: comprehensive-test-results-python-${{ matrix.python-version }} | |
| path: | | |
| comprehensive_report.md | |
| src/praisonai/htmlcov/ | |
| src/praisonai/coverage.xml | |
| src/praisonai/.coverage | |
| retention-days: 30 | |
| test-matrix-summary: | |
| runs-on: ubuntu-latest | |
| needs: comprehensive-test | |
| if: always() | |
| steps: | |
| - name: Generate Matrix Summary | |
| run: | | |
| echo "# π― Test Matrix Summary" > matrix_summary.md | |
| echo "" >> matrix_summary.md | |
| echo "## Python Version Results:" >> matrix_summary.md | |
| echo "- Python 3.10: ${{ needs.comprehensive-test.result }}" >> matrix_summary.md | |
| echo "- Python 3.11: ${{ needs.comprehensive-test.result }}" >> matrix_summary.md | |
| echo "" >> matrix_summary.md | |
| echo "## Overall Status:" >> matrix_summary.md | |
| if [ "${{ needs.comprehensive-test.result }}" == "success" ]; then | |
| echo "β **All tests passed across all Python versions!**" >> matrix_summary.md | |
| else | |
| echo "β **Some tests failed. Check individual job logs for details.**" >> matrix_summary.md | |
| fi | |
| - name: Upload Matrix Summary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-matrix-summary | |
| path: matrix_summary.md | |
| retention-days: 30 |