docs(07): mark phase complete — 7/7 plans, 39 issues resolved #76
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: CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e ".[dev]" | |
| - run: ruff check src/ tests/ | |
| test: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - run: pip install -e ".[dev,monitoring]" | |
| - run: pytest tests/ -v --ignore=tests/test_mcp_integration.py --cov=matlab_mcp --cov-report=xml --cov-report=term-missing | |
| - uses: codecov/codecov-action@v4 | |
| if: matrix.python-version == '3.12' | |
| with: | |
| files: coverage.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| security: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e ".[dev,monitoring]" | |
| - run: pip-audit | |
| continue-on-error: true | |
| build: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install build twine | |
| - run: python -m build | |
| - run: twine check dist/* | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| test-windows: | |
| needs: lint | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-2022, windows-latest] | |
| python-version: ["3.10", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - run: pip install -e ".[dev,monitoring]" | |
| - name: Verify all modules load | |
| run: | | |
| python -c "from matlab_mcp.server import main; print('OK: server')" | |
| python -c "from matlab_mcp.auth.middleware import BearerAuthMiddleware; print('OK: auth')" | |
| python -c "from matlab_mcp.hitl.gate import request_execute_approval; print('OK: hitl')" | |
| python -c "from matlab_mcp.config import HITLConfig; print('OK: HITLConfig')" | |
| - name: Run tests (no MATLAB engine) | |
| run: pytest tests/ -v -k "not matlab" --ignore=tests/test_integration.py --ignore=tests/test_mcp_integration.py -W ignore::pytest.PytestUnraisableExceptionWarning | |
| test-windows-install-bat: | |
| needs: lint | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Run install.bat (real user install path) | |
| shell: cmd | |
| run: call install.bat < nul | |
| - name: Verify install.bat produced working install | |
| shell: cmd | |
| run: | | |
| call .venv\Scripts\activate.bat | |
| python -c "from matlab_mcp.server import main; print('OK: server module loads')" | |
| test-macos: | |
| needs: lint | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - run: pip install -e ".[dev,monitoring]" | |
| - run: pytest tests/ -v -k "not matlab" --ignore=tests/test_mcp_integration.py -W ignore::pytest.PytestUnraisableExceptionWarning | |
| conda-test-dev: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| activate-environment: matlab-mcp-dev | |
| environment-file: environment-dev.yml | |
| auto-activate-base: false | |
| python-version: "3.12" | |
| - name: Verify all modules load | |
| shell: bash -el {0} | |
| run: | | |
| python -c "from matlab_mcp.server import main; print('OK: server')" | |
| python -c "from matlab_mcp.auth.middleware import BearerAuthMiddleware; print('OK: auth')" | |
| python -c "from matlab_mcp.hitl.gate import request_execute_approval; print('OK: hitl')" | |
| - name: Run unit tests | |
| shell: bash -el {0} | |
| run: pytest tests/ -v -k "not matlab" --ignore=tests/test_integration.py --ignore=tests/test_mcp_integration.py -W ignore::pytest.PytestUnraisableExceptionWarning | |
| conda-test-pypi: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| activate-environment: matlab-mcp | |
| environment-file: environment.yml | |
| auto-activate-base: false | |
| python-version: "3.12" | |
| - name: Verify server loads (PyPI install) | |
| shell: bash -el {0} | |
| run: | | |
| python -c "from matlab_mcp.server import main; print('OK: server')" | |
| python -c "from matlab_mcp.config import AppConfig; print('OK: config')" | |
| matlab-mcp --help | |
| integration-test: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e ".[dev,monitoring]" pytest-timeout | |
| - run: pytest tests/test_mcp_integration.py -v -m integration --timeout=60 | |
| integration-test-windows: | |
| needs: lint | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e ".[dev,monitoring]" pytest-timeout | |
| - run: pytest tests/test_mcp_integration.py -v -m integration --timeout=60 | |
| remote-integration-test: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: docker compose -f docker-compose.test.yml up --build --exit-code-from client | |
| - name: Cleanup | |
| if: always() | |
| run: docker compose -f docker-compose.test.yml down -v | |
| docker: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: docker build -t matlab-mcp:test . | |
| - name: Smoke-test container health endpoint | |
| run: | | |
| docker run -d --name mcp-test \ | |
| -e MATLAB_MCP_SERVER_TRANSPORT=sse \ | |
| -e MATLAB_MCP_MONITORING_ENABLED=true \ | |
| -p 8765:8765 \ | |
| matlab-mcp:test | |
| # The server will crash on pool start (no MATLAB engine in CI). | |
| # curl will fail; || true prevents the step from failing. | |
| # Goal: verify the image builds and the ENTRYPOINT is valid. | |
| sleep 5 | |
| curl --retry 5 --retry-delay 2 --retry-connrefused \ | |
| http://localhost:8765/health || true | |
| docker logs mcp-test | |
| docker stop mcp-test || true | |
| docker rm mcp-test || true |