Quick Start: lead with the 2-line auto-instrument install (3.3) — oct… #104
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: CI & Deploy | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" psycopg2-binary | |
| pip install fastapi uvicorn flask sentence-transformers numpy pytest mcp | |
| - name: Run core tests (SQLite — no DB needed) | |
| run: | | |
| pytest tests/test_sqlite.py tests/test_backend.py tests/test_memory.py \ | |
| tests/test_validation.py tests/test_licensing.py tests/test_runtime.py \ | |
| tests/test_daemon.py tests/test_gc.py tests/test_temporal.py \ | |
| tests/test_knowledge_graph.py tests/test_cloud_api.py \ | |
| tests/test_mcp_server.py -v --tb=short | |
| deploy: | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| needs: test | |
| runs-on: ubuntu-latest | |
| # We currently deploy via scp rather than CI-driven git pull because the | |
| # VPS has hand-deployed files that conflict with a clean pull. This step | |
| # is best-effort so it doesn't block the workflow status badge. | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Deploy to VPS (best-effort) | |
| uses: appleboy/ssh-action@v1 | |
| continue-on-error: true | |
| with: | |
| host: ${{ secrets.VPS_HOST }} | |
| username: root | |
| key: ${{ secrets.VPS_SSH_KEY }} | |
| script: | | |
| cd /root/octopoda | |
| # Try a fast-forward pull; if the working tree blocks it, skip | |
| # and rely on the manual scp deploy path that already shipped. | |
| git pull --ff-only origin main || echo "git pull skipped — manual scp deploy path in use" | |
| systemctl restart octopoda.service || true | |
| sleep 30 | |
| curl -fsS http://localhost:8000/health | |
| echo "Deploy successful" |