Skip to content

chore: Add pre-commit checks to CI workflow #107

@rogermt

Description

@rogermt

Description

Add global lint and type check job to forgesyte-plugins CI workflow that runs on ALL code changes.

Implementation

Add the following job to .github/workflows/forgesyte-plugins-ci.yml:

# ---------------------------------------------------------
# Global Lint + Type Check (runs on ALL code changes)
# ---------------------------------------------------------
global_quality:
  name: Global Lint & Type Check
  runs-on: ubuntu-latest

  steps:
    - name: Checkout repository
      uses: actions/checkout@v4

    - name: Set up Python
      uses: actions/setup-python@v5
      with:
        python-version: "3.11"

    - name: Install uv
      run: pip install uv

    - name: Install root dev dependencies
      run: uv pip install --system -e ".[dev]"

    - name: Install Black
      run: uv pip install --system black

    - name: Install pre-commit
      run: uv pip install --system pre-commit

    - name: Run pre-commit (consistency check)
      run: uv run pre-commit run --all-files --show-diff-on-failure

    - name: Run ruff on entire repo
      run: uv run ruff check . --exit-non-zero-on-fix

    - name: Run Black (check only)
      run: uv run black . --check --diff

    - name: Run mypy on entire repo
      run: |
        export MYPYPATH=.
        uv run mypy . --config-file mypy.ini

Rationale

Enforces consistent code quality across all commits via CI, catching lint/type errors before merge.

Related

Issue #104 - GPU video input validation

Metadata

Metadata

Assignees

No one assigned

    Labels

    choremaintenance and setup tasks

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions