@@ -49,38 +49,74 @@ jobs:
4949
5050 strategy :
5151 matrix :
52- os : ['ubuntu-latest', 'windows-latest']
53- python : ['3.8', '3.9', '3.10', '3.11']
54- # Works around the depreciation of python 3.7 for ubuntu
55- # https://github.com/actions/setup-python/issues/544
56- include :
57- - os : ' ubuntu-22.04'
58- python : ' 3.7'
52+ os : ['ubuntu-22.04', 'windows-latest']
53+ test_env : [
54+ ' py39-PyQt5' ,
55+ ' py39-PySide5' ,
56+ ' py310-PyQt5' ,
57+ ' py310-PySide5' ,
58+ ' py311-PyQt5' ,
59+ ' py311-PyQt6.7' ,
60+ ' py311-PyQt6.9' ,
61+ ' py311-PySide6.7' ,
62+ ' py311-PySide6.9' ,
63+ ]
5964
6065 runs-on : ${{ matrix.os }}
6166
6267 steps :
6368 - name : Checkout code
6469 uses : actions/checkout@v4
6570
66- - name : Setup Python
71+ # Pulled from https://github.com/mottosso/Qt.py/blob/master/.github/actions/setup-tox/action.yml
72+ - name : Install EGL mesa
73+ if : runner.os == 'Linux'
74+ shell : bash
75+ run : |
76+ sudo apt-get update -y -qq
77+ sudo apt-get install -y -qq libegl1-mesa libegl1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev
78+
79+ - name : Install GUI libs
80+ if : runner.os == 'Linux'
81+ shell : bash
82+ run : |
83+ sudo apt-get install -y -qq libxcb-xinerama0
84+ sudo apt-get install -y -qq libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xfixes0 libxcb-cursor0
85+
86+ # Note: The last python to get setup becomes the default for future python calls
87+ - name : Setup Python 3.9
88+ uses : actions/setup-python@v5
89+ with :
90+ python-version : ' 3.9'
91+
92+ - name : Setup Python 3.11
93+ uses : actions/setup-python@v5
94+ with :
95+ python-version : ' 3.11'
96+
97+ - name : Setup Python 3.10
6798 uses : actions/setup-python@v5
6899 with :
69- python-version : ${{ matrix.python }}
100+ python-version : ' 3.10 '
70101
71102 - name : Install dependencies
103+ shell : bash
72104 run : |
105+ python --version
73106 python -m pip install --upgrade pip
74107 python -m pip install tox
75108
76109 - name : Run Tox
110+ # Note: `--skip-missing-interpreters` prevents false success if python
111+ # version is not installed when testing.
77112 run : |
78- tox -e begin,py
113+ which tox
114+ tox --skip-missing-interpreters false -e begin,${{ matrix.test_env }}
79115
80116 - name : Upload coverage
81117 uses : actions/upload-artifact@v4
82118 with :
83- name : coverage-${{ matrix.os }}-${{ matrix.python }}
119+ name : coverage-${{ matrix.os }}-${{ matrix.test_env }}
84120 path : .coverage/*
85121 include-hidden-files : true
86122 retention-days : 1
0 commit comments