Files

52 lines
1.3 KiB
YAML

name: Commit Check
on:
push:
branches: ["main", "master"]
pull_request:
branches: ["main", "master"]
jobs:
preflight:
runs-on: ubuntu-latest
steps:
# 1️⃣ Checkout repo
- uses: actions/checkout@v4
# 2️⃣ Setup Python
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.10
# 3️⃣ Install dependencies (soft pin)
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# 4️⃣ Lint Python code
- name: Lint Python
run: |
pip install flake8
flake8 --max-line-length=120 .
# 5️⃣ Test import of all nodes
- name: Node Import Test
run: |
python -c "import remove_metadata_comfyui.remove_metadata"
python -c "import remove_metadata_comfyui.video_sanitizer"
# 6️⃣ Check README formatting (optional)
- name: Check README Markdown
run: |
pip install markdownlint-cli
markdownlint README.md
# 7️⃣ Optional: Check pyproject.toml
- name: Validate pyproject.toml
run: |
pip install tomli
python -c "import tomli; tomli.load(open('pyproject.toml','rb'))"