Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libegl1 libxkbcommon-x11-0 libdbus-1-3 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 x11-utils

sudo apt-get install -y libegl1 libxkbcommon-x11-0 libdbus-1-3 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 x11-utils libxcb-cursor0 libfontconfig1 libglib2.0-0
- name: Install uv
uses: astral-sh/setup-uv@v4

Expand Down Expand Up @@ -56,15 +56,10 @@ jobs:
echo "Installed Qt Binding Version:"
uv pip show ${{ matrix.qt-binding }}



- name: Run Tests
# Set QT_API environment variable based on binding
env:
QT_API: ${{ matrix.qt-binding }}
QT_QPA_PLATFORM: offscreen
run: |
if ( "$RUNNER_OS" == "Linux" ); then
xvfb-run -a uv run --no-sync pytest
else
uv run --no-sync pytest
fi
uv run --no-sync pytest
Comment on lines 61 to +65

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep Linux pytest under a virtual display

Linux matrix jobs now invoke uv run --no-sync pytest directly without the previous xvfb-run wrapper. The test suite spins up Qt widgets via pytest-qt (e.g., qtbot.addWidget in tests/test_color_range_widget.py), and GitHub’s ubuntu-latest runners are headless with no DISPLAY, so Qt will abort with “Could not connect to display” and all Linux jobs will fail. Reintroduce xvfb-run (or set QT_QPA_PLATFORM=offscreen) when runner.os == 'Linux' to preserve the virtual display used before.

Useful? React with 👍 / 👎.