mirror of
https://github.com/rookiestar28/ComfyUI-OpenClaw.git
synced 2026-08-14 00:48:07 +00:00
41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
# Pre-commit CI Workflow
|
|
# Runs all pre-commit hooks on PRs for consistent code quality
|
|
|
|
name: Pre-commit
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main, master]
|
|
push:
|
|
branches: [main, master]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
pre-commit:
|
|
name: Run Pre-commit Hooks
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install pre-commit (and formatters)
|
|
run: |
|
|
# Install black/isort explicitly so CI doesn't fail due to missing tools
|
|
# if a hook is configured to run via system python.
|
|
pip install pre-commit black==24.1.1 isort==5.13.2
|
|
pip install -r requirements-quality.txt
|
|
|
|
- name: Verify static-analysis policy directly
|
|
run: python scripts/verify_static_analysis_policy.py
|
|
|
|
- name: Run all pre-commit hooks
|
|
run: pre-commit run --all-files --show-diff-on-failure
|