graphiti/.github/workflows
Daniel Chalef 42c257c3de feat: Add comprehensive Neo4j integration testing to GitHub Actions
## Neo4j Service Integration

### 🗄️ Database Service Container
- Added Neo4j 5.26 service container with proper configuration
- **Health checks**: Cypher-shell connectivity validation with 30s startup period
- **Memory optimization**: 256-512MB heap, 256MB pagecache for CI environment
- **APOC plugin**: Included for enhanced graph operations
- **Ports**: 7687 (Bolt), 7474 (HTTP) exposed for testing

### 🧪 Integration Test Suite
- **Neo4j Connection Test**: Direct driver connectivity validation
- **HTTP Integration Tests**: Full MCP server testing via HTTP endpoint
- **MCP SDK Integration Tests**: Official MCP Python SDK validation
- **Server Startup Test**: End-to-end server initialization with database

### ⚙️ Test Environment Configuration
- **Environment Variables**: Proper Neo4j credentials and OpenAI test keys
- **Timeouts**: Robust 120s timeout for integration tests, 30s for startup
- **Wait Conditions**: Smart Neo4j readiness detection with retry logic
- **Error Handling**: Graceful failure reporting for timeout/connection issues

### 🔧 Test Infrastructure Improvements
- **Updated Integration Tests**: Fixed server command from `graphiti_mcp_server.py` → `main.py`
- **Dependency Management**: Added neo4j Python driver for connection testing
- **Multi-Stage Validation**: Connection → Integration → Server startup progression
- **Comprehensive Coverage**: Unit + Integration + End-to-end testing

### 📊 Testing Workflow Enhancements
```yaml
services:
  neo4j:
    image: neo4j:5.26
    env:
      NEO4J_AUTH: neo4j/testpassword
    options: --health-cmd "cypher-shell ..."
```

### 🎯 Benefits
- **Complete Testing**: Database integration validation in CI
- **Real Environment**: Actual Neo4j instance for realistic testing
- **Fail-Fast**: Early detection of database connectivity issues
- **Production Parity**: CI environment matches deployment requirements
- **Integration Confidence**: Full MCP server stack validation

The workflow now provides comprehensive testing from syntax validation through full database integration, ensuring the MCP server works correctly with Neo4j in production-like conditions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-30 08:50:48 -07:00
..
ai-moderator.yml feat: Add GitHub AI Moderator for automated spam detection (#856) 2025-08-25 07:25:07 -07:00
cla.yml Update cla.yml (#884) 2025-08-30 08:23:53 -07:00
claude-code-review.yml Update claude-code-review.yml (#883) 2025-08-30 08:21:46 -07:00
claude.yml Update claude.yml (#877) 2025-08-28 20:58:00 -07:00
codeql.yml Create codeql.yml (#580) 2025-06-12 19:04:34 -07:00
lint.yml depot + cleanup (#22) 2024-08-22 15:16:15 -07:00
mcp-server-docker.yml Add GitHub Actions workflow for building and pushing MCP Server Docker image (#656) 2025-07-01 15:55:08 -07:00
mcp-server-lint.yml fix: Comprehensive MCP server fixes and configuration consolidation 2025-08-30 08:50:48 -07:00
mcp-server-tests.yml feat: Add comprehensive Neo4j integration testing to GitHub Actions 2025-08-30 08:50:48 -07:00
release-graphiti-core.yml Update release-graphiti-core.yml to python 3.11 (#639) 2025-06-27 14:27:21 -07:00
typecheck.yml Potential fix for code scanning alert no. 18: Workflow does not contain permissions (#648) 2025-06-30 13:01:42 -07:00
unit_tests.yml Add support for Kuzu as the graph driver (#799) 2025-08-27 11:45:21 -04:00