Skip to main content
Glama
lint-code.yml3.4 kB
name: Lint Code # Top-level permissions set to read-only for OSSF Scorecard Token-Permissions check # See: https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions permissions: contents: read on: push: branches: [main, develop] paths: - 'src/**/*.py' - 'tests/**/*.py' - 'pyproject.toml' - 'setup.py' - '.github/workflows/*.yml' pull_request: branches: [main] # Paths filter removed - workflows run on all PRs but skip jobs when only docs change jobs: check-changes: name: Check for code changes runs-on: ubuntu-latest permissions: contents: read outputs: has-code-changes: ${{ steps.filter.outputs.src == 'true' || steps.filter.outputs.tests == 'true' || steps.filter.outputs.config == 'true' }} steps: - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 - name: Check for code changes uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3 id: filter with: filters: | src: - 'src/**/*.py' tests: - 'tests/**/*.py' config: - 'pyproject.toml' - 'setup.py' - '.github/workflows/*.yml' ruff: name: Ruff Linting needs: check-changes if: needs.check-changes.outputs.has-code-changes == 'true' runs-on: ubuntu-latest permissions: contents: read steps: - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 - name: Set up Python uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 with: python-version: "3.11" - name: Install dependencies run: | pip install -e ".[dev]" - name: Run ruff check run: ruff check src/ tests/ --output-format=github black: name: Black Formatting needs: check-changes if: needs.check-changes.outputs.has-code-changes == 'true' runs-on: ubuntu-latest permissions: contents: read steps: - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 - name: Set up Python uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 with: python-version: "3.11" - name: Install dependencies run: | pip install -e ".[dev]" - name: Run black run: black --check --diff src/ tests/ mypy: name: Type Checking needs: check-changes if: needs.check-changes.outputs.has-code-changes == 'true' runs-on: ubuntu-latest permissions: contents: read steps: - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 - name: Set up Python uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 with: python-version: "3.11" - name: Install dependencies run: | pip install -e ".[dev]" - name: Run mypy run: mypy src/ --ignore-missing-imports continue-on-error: true skip-docs-only: name: Skip (docs only) needs: check-changes if: needs.check-changes.outputs.has-code-changes != 'true' runs-on: ubuntu-latest permissions: contents: read steps: - name: Skip workflow run: echo "Documentation-only PR - lint checks skipped"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/samerfarida/mcp-ssh-orchestrator'

If you have feedback or need assistance with the MCP directory API, please join our Discord server