PR: Test using PyQt
extra packages
#991
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run the project's test suite | |
name: Tests | |
on: | |
push: | |
branches: | |
- master | |
- main | |
- '*.x' | |
pull_request: | |
branches: | |
- master | |
- main | |
- '*.x' | |
concurrency: | |
group: test-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Test ${{ matrix.os }} Python ${{ matrix.python-version }} conda=${{ matrix.use-conda }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 20 | |
defaults: | |
run: | |
shell: ${{ matrix.special-invocation }}bash -l {0} | |
env: | |
CI: 'True' | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
USE_CONDA: ${{ matrix.use-conda }} | |
PYQT5_VERSION: ${{ matrix.pyqt5-version || matrix.qt5-version-default }} | |
PYQT5_QT_VERSION: ${{ matrix.pyqt5-qt-version || matrix.pyqt5-version || matrix.qt5-version-default }} | |
PYQT6_VERSION: ${{ matrix.pyqt6-version || matrix.qt6-version-default }} | |
PYQT6_QT_VERSION: ${{ matrix.pyqt6-qt-version || matrix.pyqt6-version || matrix.qt6-version-default }} | |
PYSIDE2_VERSION: ${{ matrix.pyside2-version || matrix.qt5-version-default }} | |
PYSIDE2_QT_VERSION: ${{ matrix.pyside2-qt-version || matrix.pyside2-version || matrix.qt5-version-default }} | |
PYSIDE6_VERSION: ${{ matrix.pyside6-version || matrix.qt6-version-default }} | |
PYSIDE6_QT_VERSION: ${{ matrix.pyside6-qt-version || matrix.pyside6-version || matrix.qt6-version-default }} | |
QSCINTILLA_VERSION: ${{ matrix.qscintilla-version || matrix.qscintilla-version-default }} | |
PYQT_EXTRAS: ${{ matrix.pyqt-extras || matrix.pyqt-extras-default }} | |
SKIP_PIP_CHECK: ${{ matrix.skip-pip-check }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ['3.7', '3.11'] | |
use-conda: ['Yes', 'No'] | |
qt5-version-default: ['5.12'] | |
qt6-version-default: ['6.3'] | |
qscintilla-version-default: ['2.13'] | |
pyqt-extras-default: ['No'] | |
include: | |
- os: ubuntu-latest | |
special-invocation: 'xvfb-run --auto-servernum ' # Needed for GUI tests to work | |
- python-version: '3.11' | |
pyqt5-version: '5.15' # Python 3.11 needs 5.15+ | |
pyside2-version: '5.15' # Python 3.11 needs 5.15+ | |
pyside6-version: '6.5' # Python 3.11 needs 6.4+. Test upper bound | |
- use-conda: 'Yes' | |
skip-pyqt6: true # No PyQt6 conda packages yet | |
- use-conda: 'No' | |
pyqt5-version: '5.15' # Test with latest optional packages | |
- python-version: '3.7' | |
use-conda: 'Yes' | |
pyside2-version: '5.13' # Conda needs 5.13+ to work reliably | |
pyside2-qt-version: '5.12' # Conda only has 5.12 and 5.15, not 5.13 | |
pyside6-version: '6.4' # Conda only has 6.4 for Python <3.8 | |
- python-version: '3.11' | |
use-conda: 'No' | |
pyqt-extras: 'Yes' # Check PyQt extras | |
skip-pyside2: true # Pyside2 wheels don't support Python 3.11+ | |
pyqt6-version: '6.5' # Test upper bound | |
pyside6-version: '6.5' # Test upper bound | |
- os: windows-latest | |
python-version: '3.7' | |
use-conda: 'Yes' | |
pyqt5-version: '5.9' # Test lower bound | |
skip-pyside6: true # Test hangs with 6.4. 6.5 is not available for Python 3.7 | |
- os: windows-latest | |
python-version: '3.7' | |
use-conda: 'No' | |
pyqt6-version: 6.2 # Test lower bound | |
pyside6-version: 6.2 # Test lower bound | |
- os: windows-latest | |
python-version: '3.11' | |
use-conda: 'Yes' | |
pyside6-version: 6.5 # Test upper bound | |
- os: macos-latest | |
python-version: '3.11' | |
use-conda: 'No' | |
pyqt6-version: 6.5 # Test upper bound | |
pyside2-version: 5.15 # Test upper bound | |
steps: | |
- name: Check job values | |
run: | | |
echo "---- General setup" | |
echo "OS:" ${{ matrix.os }} | |
echo "PYTHON_VERSION:" ${{ env.PYTHON_VERSION }} | |
echo "USE_CONDA:" ${{ env.USE_CONDA }} | |
echo "---- PyQt" | |
echo "PYQT_EXTRAS:" ${{ env.PYQT_EXTRAS }} | |
echo "---- PyQt5" | |
echo "SKIP_PYQT5:" ${{ matrix.skip-pyqt5 }} | |
echo "PYQT5_VERSION:" ${{ env.PYQT5_VERSION }} | |
echo "PYQT5_QT_VERSION:" ${{ env.PYQT5_QT_VERSION }} | |
echo "QSCINTILLA_VERSION:" ${{ env.QSCINTILLA_VERSION }} | |
echo "---- PyQt6" | |
echo "SKIP_PYQT6:" ${{ matrix.skip-pyqt6 }} | |
echo "PYQT6_VERSION:" ${{ env.PYQT6_VERSION }} | |
echo "PYQT6_QT_VERSION:" ${{ env.PYQT6_QT_VERSION }} | |
echo "---- PySide2" | |
echo "SKIP_PYSIDE2:" ${{ matrix.skip-pyside2 }} | |
echo "PYSIDE2_VERSION:" ${{ env.PYSIDE2_VERSION }} | |
echo "PYSIDE2_QT_VERSION:" ${{ env.PYSIDE2_QT_VERSION }} | |
echo "---- PySide6" | |
echo "SKIP_PYSIDE6:" ${{ matrix.skip-pyside6 }} | |
echo "PYSIDE6_VERSION:" ${{ env.PYSIDE6_VERSION }} | |
echo "PYSIDE6_QT_VERSION:" ${{ env.PYSIDE6_QT_VERSION }} | |
echo "---- Other" | |
echo "SKIP_PIP_CHECK:" ${{ env.SKIP_PIP_CHECK }} | |
- name: Checkout branch | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install Linux system packages | |
if: contains(matrix.os, 'ubuntu') | |
shell: bash | |
run: | | |
sudo apt update | |
sudo apt install libpulse-dev libegl1-mesa libopengl0 gstreamer1.0-gl | |
- uses: tlambert03/setup-qt-libs@v1 | |
- name: Install Conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: '' | |
auto-activate-base: true | |
auto-update-conda: true | |
channels: conda-forge | |
channel-priority: strict | |
miniforge-variant: Mambaforge | |
use-mamba: true | |
- name: Print Conda info | |
shell: bash -l {0} | |
run: | | |
mamba info | |
mamba list | |
- name: Test PyQt5 | |
if: (! matrix.skip-pyqt5) | |
run: ./.github/workflows/test.sh pyqt5 | |
- name: Test PyQt6 | |
if: always() && (! (matrix.skip-pyqt6)) | |
run: ./.github/workflows/test.sh pyqt6 | |
- name: Test PySide2 | |
if: always() && (! (matrix.skip-pyside2)) | |
run: ./.github/workflows/test.sh pyside2 | |
- name: Test PySide6 | |
if: always() && (! (matrix.skip-pyside6)) | |
run: ./.github/workflows/test.sh pyside6 | |
- name: Upload coverage data to coveralls.io | |
shell: bash -e {0} | |
env: | |
COVERALLS_FLAG_NAME: ${{ matrix.os }} Python ${{ matrix.python-version }} conda=${{ matrix.use-conda }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cd temp_test_dir # Switch to test working dir per non-src-layout hack | |
cat qtpy_basedir.txt | |
pipx run coveralls --service=github --rcfile="../.coveragerc" --basedir="$(cat qtpy_basedir.txt)" |