Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
pull_request:

jobs:
test-and-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure Git safe directory
run: git config --global safe.directory "*"

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install pytest black ruff mypy

- name: Block Gradio .update regression
run: python tools/check_no_gradio_update.py

- name: Run tests (Gradio 3 stub)
run: python -m pytest tests/ -q

- name: Run tests (Gradio 4 stub)
run: python -m pytest tests/ -q --gradio-version=4

- name: Ruff
run: python -m ruff check scripts/ranbooru.py ranboorux tests tools install.py

- name: Black
run: python -m black --check scripts/ranbooru.py ranboorux tests tools install.py

- name: Mypy
run: python -m mypy ranboorux --warn-return-any --warn-unused-ignores
39 changes: 23 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,27 @@
.vscode/
.idea/
*.code-workspace
.project
.settings/

# OS clutter
.DS_Store
Thumbs.db
desktop.ini

# Python cache/build/test artifacts
__pycache__/
*.pyc
*.pyo
*.pyd
.pytest_cache/
.pytest_cache_local/
.mypy_cache/
.ruff_cache/
.hypothesis/
.pyre/
.tox/
.nox/
.pytest_cache_local/
.cache/
.eggs/
*.egg-info/
Expand All @@ -31,29 +34,29 @@ dist/
pip-wheel-metadata/
__pypackages__/

# SQLite databases & temp test artifacts
*.sqlite
*.db
temp_test_cache.sqlite

# Local env/secrets
.env
.env.*
*.env
.python-version
.gelbooru_credentials.json
gelbooru_creds.json

# Virtual environments
.venv/
venv/
env/
ENV/

# Logs/runtime/databases
# Logs/runtime
*.log
logs/
*.pid
*.sqlite
*.sqlite3
temp_test_cache.sqlite

# Temporary files & junk
# Temporary files
*.tmp
*.bak
*.swp
Expand All @@ -65,24 +68,28 @@ tmpclaude-*
tmp_compile_err.txt
temp_*.py

# Local tooling / personal notes / standalone scripts
# Agent / Tooling runtime clutter
.omo/
.roomodes
.rooroo/
docs/
.agent/
.agents/
.gemini/
.claude/
cleancode.md
ranbooru.before_revert.py
block.txt
line241.txt
tools/debug_lines.py
adetailer/
scripts/comments.py
.antigravityignore
.brain/

docs/

# Extension user data
user/

# Bundled catalog assets are tracked
# Ignore nested extension directory
adetailer/

# Track bundled catalog assets
!data/catalogs/
!data/catalogs/**
.github/workflows/ci.yml
Loading
Loading