feat: plugin bundling, catalog, installation and versioning #124
Workflow file for this run
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
| # =============================================================== | |
| # Lint & Static Analysis - Code Quality Gate | |
| # =============================================================== | |
| # | |
| # - Lints both cpex/ in a unified workflow | |
| # - Python linters run per-target; repo-wide checks run once | |
| # - Each job installs the project in dev-editable mode | |
| # --------------------------------------------------------------- | |
| name: Lint & Static Analysis | |
| on: | |
| workflow_call: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - "cpex/**" | |
| - "pyproject.toml" | |
| - ".github/workflows/lint.yml" | |
| pull_request: | |
| types: [opened, synchronize, ready_for_review] | |
| branches: ["main"] | |
| paths: | |
| - "cpex/**" | |
| - "pyproject.toml" | |
| - ".github/workflows/lint.yml" | |
| permissions: | |
| contents: read | |
| jobs: | |
| # --------------------------------------------------------------- | |
| # Python linters - run on both cpex/ | |
| # --------------------------------------------------------------- | |
| python-lint: | |
| if: github.event_name != 'pull_request' || !github.event.pull_request.draft | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: [cpex] | |
| tool: | |
| - id: ruff | |
| setup: pip install ruff | |
| cmd: "ruff check $TARGET" | |
| - id: vulture | |
| setup: pip install vulture | |
| cmd: 'vulture $TARGET' | |
| - id: interrogate | |
| setup: pip install interrogate | |
| cmd: "interrogate -vv $TARGET" | |
| - id: radon | |
| setup: pip install radon | |
| cmd: "radon cc $TARGET --min C --show-complexity && radon mi $TARGET --min B" | |
| name: "${{ matrix.tool.id }} (${{ matrix.target }})" | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Install project (editable mode) | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip install -e .[dev] | |
| - name: Install tool | |
| run: ${{ matrix.tool.setup }} | |
| - name: Run linter | |
| env: | |
| TARGET: ${{ matrix.target }} | |
| run: ${{ matrix.tool.cmd }} | |
| # --------------------------------------------------------------- | |
| # Repo-wide syntax/format checkers (run once, not per-target) | |
| # --------------------------------------------------------------- | |
| syntax-check: | |
| if: github.event_name != 'pull_request' || !github.event.pull_request.draft | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - id: yamllint | |
| setup: pip install yamllint | |
| cmd: | | |
| find . -type f \( -name '*.yml' -o -name '*.yaml' \) \ | |
| -not -path './cpex/templates/*' -print0 | | |
| xargs -0 yamllint -c .yamllint | |
| - id: jsonlint | |
| setup: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y jq | |
| cmd: | | |
| find . -type f -name '*.json' -not -path './node_modules/*' \ | |
| -not -path './cpex/templates/*' -print0 | | |
| xargs -0 -I{} jq empty "{}" | |
| - id: tomllint | |
| setup: pip install tomlcheck | |
| cmd: | | |
| find . -type f -name '*.toml' \ | |
| -not -path './cpex/templates/*' \ | |
| -print0 | | |
| xargs -0 -I{} tomlcheck "{}" | |
| name: ${{ matrix.id }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install tool | |
| run: ${{ matrix.setup }} | |
| - name: Run check | |
| run: ${{ matrix.cmd }} |