fix cv2 import in CI by installing the OpenCV shared libraries

The opencv-python wheel links against libGL at import time, so pytest
failed at collection with ImportError: libGL.so.1 on the runner image.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPUZks9z3Pi5oxw9GQ9znt
This commit is contained in:
2026-09-11 06:46:56 -03:00
co-authored by Claude Opus 5
parent 7c8eec9e81
commit cdc17d2787
+7
View File
@@ -36,6 +36,13 @@ jobs:
steps:
- uses: actions/checkout@v4
# The opencv-python wheel links against libGL at import time, so cv2
# cannot even be imported on the bare runner image.
- name: Install the OpenCV shared libraries
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libgl1 libglib2.0-0
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true