|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ master, main ] |
| 6 | + pull_request: |
| 7 | + branches: [ master, main ] |
| 8 | + |
| 9 | +jobs: |
| 10 | + validate: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v3 |
| 15 | + |
| 16 | + - name: Check file structure |
| 17 | + run: | |
| 18 | + echo "Checking required files..." |
| 19 | + test -f ClaudeMCP_Remote/__init__.py || (echo "Missing ClaudeMCP_Remote/__init__.py" && exit 1) |
| 20 | + test -f ClaudeMCP_Remote/liveapi_tools.py || (echo "Missing ClaudeMCP_Remote/liveapi_tools.py" && exit 1) |
| 21 | + test -f install.sh || (echo "Missing install.sh" && exit 1) |
| 22 | + test -f README.md || (echo "Missing README.md" && exit 1) |
| 23 | + test -f LICENSE || (echo "Missing LICENSE" && exit 1) |
| 24 | + echo "✓ All required files present" |
| 25 | +
|
| 26 | + - name: Validate Python syntax (Python 2.7 compatibility check) |
| 27 | + run: | |
| 28 | + echo "Checking Python 2.7 syntax compatibility..." |
| 29 | + # Check for common Python 3 syntax that breaks Python 2.7 |
| 30 | + ! grep -r "f'" ClaudeMCP_Remote/ || (echo "Found f-strings (not compatible with Python 2.7)" && exit 1) |
| 31 | + ! grep -r 'f"' ClaudeMCP_Remote/ || (echo "Found f-strings (not compatible with Python 2.7)" && exit 1) |
| 32 | + echo "✓ No obvious Python 2.7 incompatibilities found" |
| 33 | +
|
| 34 | + - name: Check for common issues |
| 35 | + run: | |
| 36 | + echo "Checking for common issues..." |
| 37 | + # Check that socket port is consistent |
| 38 | + grep -q "9004" ClaudeMCP_Remote/__init__.py || (echo "Socket port 9004 not found in __init__.py" && exit 1) |
| 39 | + echo "✓ Configuration checks passed" |
| 40 | +
|
| 41 | + - name: Validate documentation |
| 42 | + run: | |
| 43 | + echo "Checking documentation..." |
| 44 | + test -f docs/ARCHITECTURE.md || (echo "Missing docs/ARCHITECTURE.md" && exit 1) |
| 45 | + test -d examples || (echo "Missing examples directory" && exit 1) |
| 46 | + echo "✓ Documentation structure valid" |
| 47 | +
|
| 48 | + shellcheck: |
| 49 | + runs-on: ubuntu-latest |
| 50 | + |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v3 |
| 53 | + |
| 54 | + - name: Run shellcheck on install.sh |
| 55 | + run: | |
| 56 | + sudo apt-get install -y shellcheck |
| 57 | + shellcheck install.sh || echo "Shellcheck warnings found (non-blocking)" |
0 commit comments