571adb21ea
CI / test (push) Successful in 1m8s
Fixes #1 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
# CI Gitea Actions: lint (ruff) + test sintetici (pytest).
|
|
# I test non richiedono le immagini in Test/ (sono generati a runtime).
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Installa uv
|
|
run: |
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Librerie di sistema per opencv
|
|
# #1: opencv-python (non headless: pm2d/gui.py usa imshow) vuole libGL e glib
|
|
run: |
|
|
SUDO=$(command -v sudo || true)
|
|
$SUDO apt-get update -qq
|
|
$SUDO apt-get install -y -qq libgl1 libglib2.0-0
|
|
|
|
- name: Sync dipendenze
|
|
run: uv sync
|
|
|
|
- name: Lint (ruff)
|
|
# Ignore da CLI (pyproject.toml non va toccato): E501/E741 +
|
|
# stile pre-esistente del progetto (E702 statement con ';',
|
|
# E402 import dopo setup env, F841/F401 nei moduli legacy).
|
|
run: uv run ruff check pm2d/
|
|
|
|
- name: Test (pytest)
|
|
run: uv run pytest tests/ -v
|