1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [ main, develop ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ test :
14+ runs-on : ${{ matrix.os }}
15+ strategy :
16+ matrix :
17+ os : [ubuntu-latest, macos-latest, windows-latest]
18+ python-version : ['3.10', '3.11', '3.12']
19+
20+ steps :
21+ - name : Checkout code
22+ uses : actions/checkout@v4
23+
24+ - name : Set up Python ${{ matrix.python-version }}
25+ uses : actions/setup-python@v4
26+ with :
27+ python-version : ${{ matrix.python-version }}
28+
29+ - name : Install dependencies
30+ run : |
31+ python -m pip install --upgrade pip
32+ pip install -r requirements.txt
33+
34+ - name : Lint with pylint (if available)
35+ run : |
36+ pip install pylint || echo "pylint not available, skipping"
37+ python -m pylint mcp_server.py version.py || echo "Linting completed with warnings"
38+ continue-on-error : true
39+
40+ - name : Type check with mypy (if available)
41+ run : |
42+ pip install mypy || echo "mypy not available, skipping"
43+ python -m mypy mcp_server.py version.py || echo "Type checking completed with warnings"
44+ continue-on-error : true
45+
46+ - name : Test imports
47+ run : |
48+ python -c "import version; print(f'Version module: {version.__version__}')"
49+ python -c "import mcp_server; print('MCP server module imported successfully')"
50+
51+ - name : Test version consistency
52+ run : |
53+ python -c "
54+ from version import __version__, get_version, get_version_info
55+ print(f'Version: {__version__}')
56+ print(f'get_version(): {get_version()}')
57+ print(f'get_version_info(): {get_version_info()}')
58+ assert __version__ == get_version()
59+ assert get_version_info()['major'] >= 1
60+ print('✅ Version functions working correctly')
61+ "
62+
63+ - name : Test MCP server startup
64+ run : |
65+ timeout 15s python mcp_server.py || echo "Server startup test completed"
66+
67+ - name : Run simple tests
68+ run : |
69+ if [ -f "simple_test.py" ]; then
70+ python simple_test.py
71+ else
72+ echo "simple_test.py not found, skipping"
73+ fi
74+ shell : bash
75+
76+ - name : Test example configurations
77+ run : |
78+ python -c "
79+ import json
80+ import os
81+
82+ # Test Claude Desktop config
83+ with open('examples/claude_desktop_config.json', 'r') as f:
84+ claude_config = json.load(f)
85+ assert 'mcpServers' in claude_config
86+ assert 'google-adk' in claude_config['mcpServers']
87+ print('✅ Claude Desktop config is valid JSON')
88+
89+ # Test Cursor configs
90+ with open('examples/cursor_mcp_config.json', 'r') as f:
91+ cursor_config = json.load(f)
92+ assert 'mcpServers' in cursor_config
93+ assert 'google-adk' in cursor_config['mcpServers']
94+ print('✅ Cursor config is valid JSON')
95+
96+ with open('examples/cursor_mcp_config_simple.json', 'r') as f:
97+ cursor_simple_config = json.load(f)
98+ assert 'mcpServers' in cursor_simple_config
99+ assert 'google-adk' in cursor_simple_config['mcpServers']
100+ print('✅ Cursor simple config is valid JSON')
101+ "
102+
103+ docs :
104+ runs-on : ubuntu-latest
105+
106+ steps :
107+ - name : Checkout code
108+ uses : actions/checkout@v4
109+
110+ - name : Check documentation files
111+ run : |
112+ echo "📋 Checking documentation files..."
113+
114+ # Check required files exist
115+ required_files=(
116+ "README.md"
117+ "CHANGELOG.md"
118+ "USAGE.md"
119+ "requirements.txt"
120+ "version.py"
121+ "examples/CURSOR_SETUP.md"
122+ )
123+
124+ for file in "${required_files[@]}"; do
125+ if [ -f "$file" ]; then
126+ echo "✅ $file exists"
127+ else
128+ echo "❌ $file missing"
129+ exit 1
130+ fi
131+ done
132+
133+ - name : Validate README structure
134+ run : |
135+ echo "📋 Validating README structure..."
136+
137+ required_sections=(
138+ "## ✨ Key Features"
139+ "## 🛠 Available MCP Tools"
140+ "## 🚀 Installation"
141+ "## 📖 Usage"
142+ "## 🎯 Example Workflows"
143+ )
144+
145+ for section in "${required_sections[@]}"; do
146+ if grep -q "$section" README.md; then
147+ echo "✅ Found: $section"
148+ else
149+ echo "❌ Missing section: $section"
150+ exit 1
151+ fi
152+ done
153+
154+ - name : Validate CHANGELOG format
155+ run : |
156+ echo "📋 Validating CHANGELOG format..."
157+
158+ # Check for required changelog elements
159+ if grep -q "## \[1\.0\.0\]" CHANGELOG.md; then
160+ echo "✅ Version 1.0.0 entry found"
161+ else
162+ echo "❌ Version 1.0.0 entry missing"
163+ exit 1
164+ fi
165+
166+ if grep -q "### Added" CHANGELOG.md; then
167+ echo "✅ 'Added' section found"
168+ else
169+ echo "❌ 'Added' section missing"
170+ exit 1
171+ fi
172+
173+ if grep -q "### Fixed" CHANGELOG.md; then
174+ echo "✅ 'Fixed' section found"
175+ else
176+ echo "❌ 'Fixed' section missing"
177+ exit 1
178+ fi
179+
180+ security :
181+ runs-on : ubuntu-latest
182+
183+ steps :
184+ - name : Checkout code
185+ uses : actions/checkout@v4
186+
187+ - name : Set up Python
188+ uses : actions/setup-python@v4
189+ with :
190+ python-version : ' 3.11'
191+
192+ - name : Install safety
193+ run : |
194+ python -m pip install --upgrade pip
195+ pip install safety
196+
197+ - name : Check dependencies for security vulnerabilities
198+ run : |
199+ pip install -r requirements.txt
200+ safety check --json || echo "Security check completed with warnings"
201+ continue-on-error : true
202+
203+ - name : Check for sensitive information
204+ run : |
205+ echo "🔍 Checking for sensitive information..."
206+
207+ # Check for potential API keys or secrets
208+ if grep -r "api[_-]key\|secret\|password\|token" --include="*.py" --include="*.json" . | grep -v "your-" | grep -v "example" | grep -v "placeholder"; then
209+ echo "⚠️ Potential sensitive information found"
210+ exit 1
211+ else
212+ echo "✅ No sensitive information detected"
213+ fi
0 commit comments