docs: Update MCP support doc to use image diagram #46
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: Run Project Tests & Coverage # Updated name | |
| # When should this workflow run? | |
| on: | |
| push: | |
| branches: [ "main" ] # Run on pushes to the main branch | |
| pull_request: | |
| branches: [ "main" ] # Run on pull requests targeting the main branch | |
| # Optional: Allow manual trigger from Actions tab | |
| workflow_dispatch: | |
| jobs: # Define one or more jobs to run | |
| test: # Name of the job (can be anything descriptive) | |
| runs-on: ubuntu-latest # Specify the runner environment (Linux is common for Python) | |
| # Optional: Define a strategy matrix to run on multiple Python versions | |
| # strategy: | |
| # matrix: | |
| # python-version: ['3.10', '3.11'] # Test against supported Python versions | |
| name: Run Pytest with Coverage # Updated display name | |
| steps: # Sequence of tasks to execute | |
| # Step 1: Get the code from the repository | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 # Use the standard checkout action | |
| # Step 2: Set up the specified Python version | |
| - name: Set up Python ${{ matrix.python-version || '3.11' }} # Use matrix version or default to 3.11 | |
| id: setup-python # Give this step an ID for later reference | |
| uses: actions/setup-python@v5 | |
| with: | |
| # Use the Python version from the matrix, or default to 3.11 if matrix isn't used | |
| python-version: ${{ matrix.python-version || '3.11' }} | |
| # Step 3: Install Poetry (using exact version) | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: '1.8.3' # Specify an exact, known stable version | |
| virtualenvs-create: true | |
| virtualenvs-in-project: false # Keep false for CI caching | |
| installer-parallel: true | |
| # Step 4: Display Poetry version (for debugging) | |
| - name: Display Poetry version | |
| run: poetry --version | |
| # Step 5: Load cached Poetry cache | |
| - name: Load cached Poetry cache # Cache Poetry's package cache | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pypoetry # Standard cache location on Linux runners | |
| key: poetry-cache-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} | |
| restore-keys: | | |
| poetry-cache-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}- | |
| # Step 6: Install main dependencies using Poetry | |
| - name: Install dependencies | |
| run: poetry install --no-interaction --no-root --with dev | |
| # --no-interaction: Don't ask questions | |
| # --no-root: Don't install the root monorepo package itself (it's not a package) | |
| # --with dev: Install development dependencies (like pytest) | |
| # --- ADDED: Explicitly install pytest-cov --- | |
| # Step 6.1: Ensure pytest-cov is installed | |
| # Sometimes necessary even if in dev dependencies for pytest to pick it up reliably in CI | |
| - name: Install pytest-cov | |
| run: poetry run pip install pytest-cov | |
| # --- END ADDED --- | |
| # --- ADDED: Debug step to list packages --- | |
| # Step 6.2: List installed packages (for debugging) | |
| - name: List installed packages | |
| run: poetry run pip list | |
| # --- END ADDED --- | |
| # Step 7: Run Pytest with Coverage | |
| - name: Run tests with pytest and generate coverage report | |
| run: | | |
| # Run pytest with coverage for all relevant source directories | |
| # Generate terminal report and XML report | |
| poetry run pytest \ | |
| --cov=agentvault_cli/src \ | |
| --cov=agentvault_library/src \ | |
| --cov=agentvault_registry/src \ | |
| --cov=agentvault_server_sdk/src \ | |
| --cov=agentvault_testing_utils/src \ | |
| --cov-report=term-missing \ | |
| --cov-report=xml:coverage.xml \ | |
| -v --import-mode=importlib \ | |
| agentvault_cli/tests \ | |
| agentvault_library/tests \ | |
| agentvault_registry/tests \ | |
| agentvault_server_sdk/tests \ | |
| agentvault_testing_utils/tests | |
| # --- END MODIFIED --- | |
| # Step 8: Upload coverage report artifact | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report-${{ matrix.python-version || '3.11' }} | |
| path: coverage.xml | |
| if-no-files-found: error # Error if coverage.xml wasn't generated |