Add ADK #8
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: Test Obol Agent AG-UI | |
| on: | |
| push: | |
| branches: [ main, feature/* ] | |
| paths: | |
| - 'obol-adk/obol-agent-ag-ui/**' | |
| - '.github/workflows/test-obol-agent-ag-ui.yml' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'obol-adk/obol-agent-ag-ui/**' | |
| - '.github/workflows/test-obol-agent-ag-ui.yml' | |
| jobs: | |
| test-agent-endpoint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| cd obol-adk/obol-agent-ag-ui | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install requests | |
| - name: Start agent in background | |
| env: | |
| GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
| run: | | |
| cd obol-adk/obol-agent-ag-ui | |
| # Create minimal .env | |
| echo "FILESYSTEM_MCP_PATHS=" > .env | |
| echo "GOOGLE_API_KEY=${GOOGLE_API_KEY}" >> .env | |
| # Start agent in background | |
| nohup python agent.py > agent.log 2>&1 & | |
| echo $! > agent.pid | |
| # Wait for agent to start | |
| sleep 10 | |
| - name: Run health check | |
| run: | | |
| # Check if agent is responding | |
| curl -f http://localhost:8000/health || (cat obol-adk/obol-agent-ag-ui/agent.log && exit 1) | |
| - name: Run endpoint tests | |
| run: | | |
| cd obol-adk/obol-agent-ag-ui | |
| python test_agent.py || (cat agent.log && exit 1) | |
| - name: Stop agent | |
| if: always() | |
| run: | | |
| if [ -f obol-adk/obol-agent-ag-ui/agent.pid ]; then | |
| kill $(cat obol-adk/obol-agent-ag-ui/agent.pid) || true | |
| fi | |
| - name: Upload agent logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: agent-logs | |
| path: obol-adk/obol-agent-ag-ui/agent.log | |