Files

51 lines
1.4 KiB
YAML

name: Code Quality Checks
on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]
jobs:
quality-checks:
name: Python Code Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install ruff pytest
- name: Lint with ruff
run: ruff check .
- name: Test Python imports and node loading
run: |
python -c "from nodes.nodes import NODE_CLASS_MAPPINGS; print('✓ Custom nodes loaded successfully:', list(NODE_CLASS_MAPPINGS.keys()))"
- name: Check pyproject.toml validity
run: |
python -c "
import tomllib
with open('pyproject.toml', 'rb') as f:
config = tomllib.load(f)
assert 'project' in config, 'Missing project section'
assert 'name' in config['project'], 'Missing project name'
assert 'version' in config['project'], 'Missing project version'
print('✓ pyproject.toml is valid')
"