name: Lint on: push: branches: [ main, develop ] paths: - 'src/**' - 'scripts/python/**' - 'tests/python/**' - '.github/workflows/lint.yml' pull_request: branches: [ main, develop ] paths: - 'src/**' - 'scripts/python/**' - 'tests/python/**' - '.github/workflows/lint.yml' concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.11' - name: Cache pip dependencies uses: actions/cache@v4 with: path: ~/.cache/pip key: pip-lint-${{ runner.os }}-ruff restore-keys: | pip-lint-${{ runner.os }}- - name: Install dependencies run: | python -m pip install --upgrade pip pip install ruff - name: Lint MCP package (strict) run: | ruff check src/ tests/python/ --output-format=github - name: Check formatting MCP package run: | ruff format --check src/ tests/python/ - name: Lint legacy scripts (warnings only) continue-on-error: true run: | ruff check scripts/python/ --output-format=github || echo "Legacy scripts have lint warnings (non-blocking)"