Files

66 lines
1.6 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: Lint & Type Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff mypy
- name: Lint with Ruff
run: ruff check . --output-format=github
- name: Check formatting with Ruff
run: ruff format --check .
validate:
name: Validate Python Syntax
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install torch --index-url https://download.pytorch.org/whl/cpu
- name: Validate Python syntax
run: |
python -m py_compile __init__.py
python -m py_compile nodes/__init__.py nodes/auto_size.py nodes/auto_size_latent.py
python -m py_compile utils/presets.py utils/resize.py
- name: Test imports
run: |
python -c "from utils import presets; print('✓ presets.py imports successfully')"
python -c "from utils import resize; print('✓ resize.py imports successfully')"