diff --git a/.github/workflows/test-addons.yml b/.github/workflows/test-addons.yml index f0e5d43..b709c3f 100644 --- a/.github/workflows/test-addons.yml +++ b/.github/workflows/test-addons.yml @@ -73,29 +73,35 @@ jobs: if: runner.os == 'Linux' && startsWith(matrix.pyqt, '6') run: | sudo apt-get update - sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa libxcb-shape0 + sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa libxcb-shape0 libxcb-cursor0 - name: Install dependencies run: | python -m pip install --upgrade pip python -m pip install --upgrade tox - - - name: Set environment variable - # this step sets QT_QPA_PLATFORM env which is mandatory on Linux and - # it is skipped on Windows since it produces SEGFAULT when WebView used - if: runner.os != 'Windows' - run: | - echo "QT_QPA_PLATFORM=offscreen" >> $GITHUB_ENV - - name: Set Ubuntu eviroment variables - # on Ubuntu QTWEBENGINE_CHROMIUM_FLAGS needs to be set for webview to work - if: runner.os == 'Linux' + - name: Test with Tox at Ubuntu + if: matrix.os == 'ubuntu-latest' run: | - echo "QTWEBENGINE_CHROMIUM_FLAGS=--disable-gpu --no-sandbox" >> $GITHUB_ENV + catchsegv xvfb-run -a -s "$XVFBARGS" tox -e ${{ matrix.tox_env }} + env: + # Set pyqt and webengine versions. + PYQT_PYPI_NAME: "${{ startsWith(matrix.pyqt, '5') && 'PyQt5' || 'PyQt6' }}" + PYQT_PYPI_VERSION: ${{ matrix.pyqt }} + WEBENGINE_PYPI_NAME: "${{ startsWith(matrix.pyqt, '5') && 'PyQtWebEngine' || 'PyQt6-WebEngine' }}" + WEBENGINE_PYPI_VERSION: ${{ matrix.pyqt }} - - name: Test with Tox - run: | - tox -e ${{ matrix.tox_env }} + # Need this otherwise unittest installs a warning filter that overrides + # our desire to have OrangeDeprecationWarnings raised + PYTHONWARNINGS: module + # for xvfb at Ubuntu + XVFBARGS: "-screen 0 1280x1024x24" + # on Ubuntu QTWEBENGINE_CHROMIUM_FLAGS needs to be set for webview to work + QTWEBENGINE_CHROMIUM_FLAGS: "--disable-gpu --no-sandbox" + + - name: Test with Tox at other systems + if: matrix.os != 'ubuntu-latest' + run: tox -e ${{ matrix.tox_env }} env: # Set pyqt and webengine versions. PYQT_PYPI_NAME: "${{ startsWith(matrix.pyqt, '5') && 'PyQt5' || 'PyQt6' }}"