|
| 1 | +name: 🧪 Test MCP Server |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main ] |
| 6 | + pull_request: |
| 7 | + branches: [ main ] |
| 8 | + |
| 9 | +jobs: |
| 10 | + test: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + python-version: ["3.9", "3.10", "3.11", "3.12"] |
| 15 | + |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v4 |
| 18 | + |
| 19 | + - name: Set up Python ${{ matrix.python-version }} |
| 20 | + uses: actions/setup-python@v4 |
| 21 | + with: |
| 22 | + python-version: ${{ matrix.python-version }} |
| 23 | + |
| 24 | + - name: Install dependencies |
| 25 | + run: | |
| 26 | + python -m pip install --upgrade pip |
| 27 | + pip install -r requirements.txt |
| 28 | + pip install pytest |
| 29 | + |
| 30 | + - name: Test MCP server can start |
| 31 | + run: | |
| 32 | + timeout 10s python mcp_chatmode_server.py || test $? = 124 |
| 33 | + |
| 34 | + - name: Test example usage |
| 35 | + run: | |
| 36 | + python example_usage.py |
| 37 | + |
| 38 | + - name: Validate chat mode templates |
| 39 | + run: | |
| 40 | + # Basic validation that chat mode files exist and are properly formatted |
| 41 | + test -f "chat_modes/azure-bicep-development/azure-bicep-development.chatmode.md" |
| 42 | + test -f "chat_modes/lambda-to-functions-migration/lambda-to-functions-migration.chatmode.md" |
| 43 | + test -f "chat_modes/spec-driven-development/spec-driven-development.chatmode.md" |
| 44 | + |
| 45 | + # Validate that prompt files exist |
| 46 | + test -f "chat_modes/azure-bicep-development/review.prompt.md" |
| 47 | + test -f "chat_modes/azure-bicep-development/deploy.prompt.md" |
| 48 | + test -f "chat_modes/lambda-to-functions-migration/evaluate.prompt.md" |
| 49 | + test -f "chat_modes/lambda-to-functions-migration/validate.prompt.md" |
| 50 | + test -f "chat_modes/spec-driven-development/validate_spec.prompt.md" |
| 51 | + test -f "chat_modes/spec-driven-development/generate_tests.prompt.md" |
| 52 | + |
| 53 | + echo "✅ All chat mode templates validated successfully!" |
0 commit comments