Fix-CI
Some checks failed
Lint / lint (push) Failing after 11s
Tests / test (3.10) (push) Failing after 51m16s
Tests / test (3.11) (push) Failing after 51m17s
Tests / test (3.9) (push) Failing after 51m49s
Python CI / test (push) Failing after 26s

This commit is contained in:
Duncan Tourolle 2025-10-21 23:16:52 +02:00
parent 6ef4458823
commit ea4e653e66

View File

@ -47,8 +47,16 @@ jobs:
id: pytest
continue-on-error: true
run: |
# Run tests with coverage using xvfb for Qt
xvfb-run -a python -m pytest tests/ -v --cov=pyPhotoAlbum --cov-report=term-missing --cov-report=json --cov-report=html --cov-report=xml
# Run tests with coverage
# Check if xvfb-run is available, use it if present
if command -v xvfb-run &> /dev/null; then
echo "Using xvfb-run for headless Qt testing"
xvfb-run -a python -m pytest tests/ -v --cov=pyPhotoAlbum --cov-report=term-missing --cov-report=json --cov-report=html --cov-report=xml
else
echo "xvfb-run not found, running with QT_QPA_PLATFORM=offscreen only"
echo "For better Qt support, install: sudo apt-get install xvfb"
python -m pytest tests/ -v --cov=pyPhotoAlbum --cov-report=term-missing --cov-report=json --cov-report=html --cov-report=xml
fi
env:
QT_QPA_PLATFORM: offscreen