Fix-CI
This commit is contained in:
parent
6ef4458823
commit
ea4e653e66
@ -47,8 +47,16 @@ jobs:
|
|||||||
id: pytest
|
id: pytest
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
# Run tests with coverage using xvfb for Qt
|
# 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
|
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:
|
env:
|
||||||
QT_QPA_PLATFORM: offscreen
|
QT_QPA_PLATFORM: offscreen
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user