ci: fix the two run #1 findings
CI / gates (push) Successful in 1m17s

Run #1 (6302e0b) failed at the tests gate for two reasons local runs
masked:

- The act image lacks OpenCV's runtime libs, so every
  scenedetect-importing media test died on `ImportError: libGL.so.1`.
  The workflow now installs libgl1/libglib2.0-0 with ffmpeg, and the
  README documents the headless-Linux runtime libs for users.
- Rich rendered `va transcribe --help` at 80 columns and wrapped
  `openai-transcriptions` mid-token: GITHUB_ACTIONS makes typer force a
  terminal, and TERM=dumb then picks rich's 80-column fallback. Tests
  now pin COLUMNS=120 before any Console is constructed and keep typer
  in auto-detect mode, so help and doctor output are width-independent
  of the runner.

Gates 4/4: 449 passed, 2 skipped; also green under
GITHUB_ACTIONS=true COLUMNS=80.
This commit is contained in:
alex committed 2026-11-24 13:24:08 +00:00
1 parent 6302e0b90e
commit b976489f9b
3 files changed
+15 -3

No files matched your search

+4 -3
View File
@@ -14,11 +14,12 @@ jobs:
- uses: actions/checkout@v4
# The media fixtures shell out to ffmpeg; without it the tests skip silently
# and CI lies about what it covered.
- name: Install ffmpeg
# and CI lies about what it covered. libgl1/libglib2.0-0 are opencv's runtime
# deps (scenedetect) — run #1 proved the act image lacks them.
- name: Install ffmpeg and OpenCV runtime libs
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ffmpeg
sudo apt-get install -y --no-install-recommends ffmpeg libgl1 libglib2.0-0
# The official installer; it appends its bin dir to $GITHUB_PATH.
- name: Install uv
+4
View File
@@ -37,6 +37,10 @@ stage (speech-to-text, vision, synthesis) can run locally or against a hosted pr
| Python **3.13** | project targets `>=3.13,<3.14` (pinned in `.python-version`) | `uv python install 3.13` |
| [uv](https://docs.astral.sh/uv/) | environment and dependency management | any recent version |
On headless Linux (servers, containers, CI) the OpenCV build behind shot detection also
needs its runtime libs: `sudo apt install libgl1 libglib2.0-0`. Desktop installs normally
have both already.
`va doctor` verifies `ffmpeg`, `ffprobe`, `yt-dlp`, the Python version, the llama-server,
API-key presence, diarization assets, the cache and free disk space.
+7
View File
@@ -12,6 +12,13 @@ import pytest
# Keep pydantic-ai's one-off banner out of test output.
os.environ.setdefault("PYDANTIC_AI_NO_BANNER", "1")
# Pin rich's render width before any Console is constructed (rich 15 snapshots COLUMNS
# at construction) and keep typer in auto-detect mode: under GITHUB_ACTIONS (Gitea
# Actions sets it) typer forces a terminal, and TERM=dumb then renders help at 80
# columns mid-token. CLI tests assert help text, so width must not depend on the runner.
os.environ["COLUMNS"] = "120"
os.environ["_TYPER_FORCE_DISABLE_TERMINAL"] = "1"
FFMPEG = shutil.which("ffmpeg")
# Exact generator command (synthetic 640x360 @ 12 fps, 10 s, 440 Hz tone).