fix: correct repo URLs from midos-mcp to midos #35
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: MidOS MCP CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: pip install -e ".[dev]" | |
| - name: Syntax check — all Python files | |
| run: | | |
| python -c " | |
| import ast, sys, pathlib | |
| files = list(pathlib.Path('modules').rglob('*.py')) | |
| files += list(pathlib.Path('hive_commons').rglob('*.py')) | |
| errors = [] | |
| for f in files: | |
| try: | |
| ast.parse(open(f, encoding='utf-8').read()) | |
| except SyntaxError as e: | |
| errors.append(f'{f}: {e}') | |
| if errors: | |
| for e in errors: print(f'FAIL: {e}') | |
| sys.exit(1) | |
| print(f'OK: {len(files)} files pass syntax check') | |
| " | |
| - name: Import check — MCP server loads | |
| run: | | |
| python -c "from modules.mcp_server.midos_mcp import mcp; print(f'MCP server loaded: {len(mcp._tool_manager._tools)} tools')" | |
| docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Docker image | |
| run: docker build -t midos-mcp:ci . | |
| secret-scan: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Secret scan | |
| run: | | |
| PATTERNS='(sk-[a-zA-Z0-9]{20,}|AIza[a-zA-Z0-9_-]{35}|ghp_[a-zA-Z0-9]{36}|glpat-[a-zA-Z0-9-]{20,})' | |
| if grep -rP "$PATTERNS" --include='*.py' --include='*.json' --include='*.env*' --include='*.md' --include='*.yml' .; then | |
| echo "::error::LEAKED SECRETS DETECTED" | |
| exit 1 | |
| fi | |
| echo "No secrets found." |