Skip to content

Commit cb9aebd

Browse files
authored
Add Azure Pipelines instructions for running pytest-qt tests with PyQt6
1 parent 26b05ba commit cb9aebd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/troubleshooting.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,22 @@ And here is a working Qt6 GitLab CI/CD config :
123123
- python -m pytest test.py
124124
125125
126+
And here is a working Qt6 Azure Pipelines CI/CD config for ``ubuntu-latest`` :
127+
128+
.. code-block:: yaml
129+
130+
# this was tested with ``ubuntu-latest`` image
131+
- script: |
132+
sudo apt update
133+
sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 libxcb-shape0 libglib2.0-0 libgl1-mesa-dev
134+
sudo apt-get install -y '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
135+
sudo apt-get install -y x11-utils
136+
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
137+
displayName: 'Install and start xvfb and other dependencies on Linux for Qt GUI tests'
138+
condition: and(succeededOrFailed(), eq(variables['Agent.OS'], 'Linux'))
139+
# After this step, assuming you have ``pytest-qt`` installed, just run ``pytest`` and your PyQt6 tests will work
140+
141+
126142
``tlambert03/setup-qt-libs``
127143
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
128144
Instead manually curate list of used packages you may use ``tlambert03/setup-qt-libs`` github action: https://github.com/tlambert03/setup-qt-libs

0 commit comments

Comments
 (0)