Skip to content

feat(yolo-tracker): Add video_player_detection tool for v0.9.5 #31

feat(yolo-tracker): Add video_player_detection tool for v0.9.5

feat(yolo-tracker): Add video_player_detection tool for v0.9.5 #31

name: ForgeSyte Plugins CI
on:
pull_request:
paths:
- "plugins/**/manifest.json"
- "validate_manifest.py"
push:
branches: [ main ]
paths:
- "plugins/**"
- "validate_manifest.py"
jobs:
# ---------------------------------------------------------
# Static Manifest Validation (file-level)
# ---------------------------------------------------------
validate_static_manifests:
name: Validate Static Manifests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
pip-${{ runner.os }}-${{ matrix.python-version }}-
- name: Install validator dependencies
run: pip install --upgrade pip
- name: Validate manifest.json files
run: |
echo "Scanning for manifest.json files..."
find . -type f -name "manifest.json" | while read manifest; do
echo "Validating: $manifest"
MANIFEST_PATH="$manifest" python3 validate_manifest.py
done
# ---------------------------------------------------------
# Plugin Quality Checks (lint, type-check, tests)
# ---------------------------------------------------------
plugin_quality:
name: Plugin Quality Checks
runs-on: ubuntu-latest
needs: validate_static_manifests
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
pip-${{ runner.os }}-${{ matrix.python-version }}-
- name: Install uv
run: pip install uv
- name: Install YOLO plugin dev dependencies
run: |
cd plugins/forgesyte-yolo-tracker
uv pip install --system -e ".[dev]"
- name: Run pre-commit checks
run: |
uv run pre-commit run --all-files
- name: Test YOLO plugin
run: |
cd plugins/forgesyte-yolo-tracker
make test-fast
- name: Test OCR plugin
run: |
cd plugins/ocr
uv pip install --system -e ".[dev]"
uv run pytest -v --cov --cov-report=term-missing
- name: Lint all plugins
run: |
for plugin_dir in plugins/*/; do
plugin_name=$(basename "$plugin_dir")
if [[ "$plugin_name" == "block_mapper" || "$plugin_name" == "moderation" || "$plugin_name" == "motion_detector" || "$plugin_name" == "plugin_template" ]]; then
echo "Skipping unmigrated plugin: $plugin_name"
continue
fi
echo "Linting $plugin_name..."
cd "$plugin_dir"
uv run ruff check src/ --exit-non-zero-on-fix
cd - > /dev/null
done
- name: Type check all plugins
run: |
for plugin_dir in plugins/*/; do
plugin_name=$(basename "$plugin_dir")
if [[ "$plugin_name" == "block_mapper" || "$plugin_name" == "moderation" || "$plugin_name" == "motion_detector" || "$plugin_name" == "plugin_template" ]]; then
echo "Skipping unmigrated plugin: $plugin_name"
continue
fi
echo "Type checking $plugin_name..."
cd "$plugin_dir"
export MYPYPATH=../..
uv run mypy src/ --config-file ../../mypy.ini
cd - > /dev/null
done