fix: propagate AddResult failures and log embedding errors (#2821) #986
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: Cross-Repo Integration Tests | ||
|
Check failure on line 1 in .github/workflows/integration-cross-repo.yml
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| paths: | ||
| - 'src/praisonai/praisonai/integration/**' | ||
| - 'src/praisonai/tests/integration/test_aiui_*' | ||
| - 'src/praisonai/pyproject.toml' | ||
| - 'src/praisonai-code/**' | ||
| - '.github/workflows/integration-cross-repo.yml' | ||
| - '.github/actions/install-monorepo-packages/**' | ||
| pull_request: | ||
| branches: [ main ] | ||
| paths: | ||
| - 'src/praisonai/praisonai/integration/**' | ||
| - 'src/praisonai/tests/integration/test_aiui_*' | ||
| - 'src/praisonai/pyproject.toml' | ||
| - 'src/praisonai-code/**' | ||
| - '.github/workflows/integration-cross-repo.yml' | ||
| - '.github/actions/install-monorepo-packages/**' | ||
| workflow_dispatch: | ||
| jobs: | ||
| cross-repo-integration: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - name: Checkout PraisonAI | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| path: PraisonAI | ||
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | ||
| - name: Checkout PraisonAIUI | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: MervinPraison/PraisonAIUI | ||
| path: PraisonAIUI | ||
| ref: main | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.11' | ||
| - name: Install dependencies | ||
| run: python -m pip install --upgrade pip | ||
| - uses: PraisonAI/.github/actions/install-monorepo-packages | ||
| with: | ||
| repo-root: PraisonAI/ | ||
| wrapper-extras: ".[ui,dev]" | ||
| - name: Install PraisonAIUI | ||
| run: | | ||
| cd PraisonAIUI | ||
| pip install -e . | ||
| pip install pytest pytest-cov | ||
| - name: Verify versions | ||
| run: | | ||
| python -c "import praisonaiagents; print(f'praisonaiagents: {praisonaiagents.__version__}')" | ||
| python -c "import praisonai; print(f'praisonai: {praisonai.__version__}')" | ||
| python -c "import praisonaiui; print(f'praisonaiui: {praisonaiui.__version__}')" | ||
| - name: Run PraisonAI integration tests | ||
| run: | | ||
| cd PraisonAI/src/praisonai | ||
| python -m pytest tests/integration/test_aiui_* -v | ||
| - name: Run PraisonAIUI integration tests | ||
| run: | | ||
| cd PraisonAIUI | ||
| if [ -f tests/integration/test_agentic_roundtrip.py ]; then | ||
| python -m pytest tests/integration/test_agentic_roundtrip.py -v | ||
| fi | ||
| if [ -f tests/test_feature_sdk_backends.py ]; then | ||
| python -m pytest tests/test_feature_sdk_backends.py -v | ||
| fi | ||
| - name: Test Pattern C CLI | ||
| run: | | ||
| cd PraisonAI/src/praisonai | ||
| # Test that ui-gateway command exists | ||
| python -m praisonai serve --help | grep ui-gateway | ||
| - name: Test public API exports | ||
| run: | | ||
| cd PraisonAI/src/praisonai | ||
| python -c "from praisonai import run_integrated_gateway; print('β run_integrated_gateway imported')" | ||
| python -c "from praisonai import configure_host; print('β configure_host imported')" | ||
| - name: Integration smoke test | ||
| env: | ||
| PRAISONAI_TEST_MODE: "1" | ||
| PYTHONPATH: ${{ github.workspace }}/PraisonAI/src/praisonai:${{ github.workspace }}/PraisonAI/src/praisonai-agents:${{ github.workspace }}/PraisonAIUI | ||
| run: | | ||
| cd PraisonAI/src/praisonai | ||
| python -c " | ||
| import sys | ||
| sys.path.insert(0, '.') | ||
| from praisonai.integration.host_app import configure_host | ||
| from praisonai import run_integrated_gateway | ||
| print('β Integration imports successful') | ||
| # Test configure_host with new parameters | ||
| try: | ||
| configure_host( | ||
| style='dashboard', | ||
| context_paths=['AGENTS.md'], | ||
| title='Test App' | ||
| ) | ||
| print('β configure_host with new parameters works') | ||
| except Exception as e: | ||
| print(f'Γ configure_host failed: {e}') | ||
| sys.exit(1) | ||
| " | ||
| # Optional job with API key for agentic tests (if secret is available) | ||
| agentic-integration: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| if: ${{ vars.RUN_AGENTIC_TESTS == 'true' }} | ||
| needs: cross-repo-integration | ||
| steps: | ||
| - name: Checkout PraisonAI | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| path: PraisonAI | ||
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | ||
| - name: Checkout PraisonAIUI | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: MervinPraison/PraisonAIUI | ||
| path: PraisonAIUI | ||
| ref: main | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.11' | ||
| - name: Install dependencies | ||
| run: python -m pip install --upgrade pip | ||
| - uses: PraisonAI/.github/actions/install-monorepo-packages | ||
| with: | ||
| repo-root: PraisonAI/ | ||
| wrapper-extras: ".[ui,dev]" | ||
| - name: Install PraisonAIUI | ||
| run: | | ||
| cd PraisonAIUI | ||
| pip install -e . | ||
| - name: Run agentic integration test | ||
| env: | ||
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
| run: | | ||
| cd PraisonAI/src/praisonai | ||
| if [ -n "$OPENAI_API_KEY" ]; then | ||
| python -m pytest tests/integration/test_aiui_host_agentic.py -v | ||
| else | ||
| echo "OPENAI_API_KEY not available, skipping agentic tests" | ||
| fi | ||