Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ffaf00e

Browse files
committed
ci: Remove extra conditions for optional GUI dependencies
We aren't testing on macOS 10.12 any more, but macos-latest, which is now macOS 12. Wheels for Python 3.12 should be available everywhere by now as well. Only PySide2 remains conditional, as it is deprecated, but provides universal wheels that install but don't work on Python 3.12.
1 parent 4c69754 commit ffaf00e

File tree

1 file changed

+19
-28
lines changed

1 file changed

+19
-28
lines changed

.github/workflows/tests.yml

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ jobs:
232232
# (sometimes, the install appears to be successful but shared
233233
# libraries cannot be loaded at runtime, so an actual import is a
234234
# better check).
235-
# PyGObject, pycairo, and cariocffi do not install on macOS 10.12.
236235
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
237236
(
238237
python -c 'import gi; gi.require_version("Gtk", "4.0"); from gi.repository import Gtk' &&
@@ -242,43 +241,35 @@ jobs:
242241
echo 'PyGObject 3 is available' || echo 'PyGObject 3 is not available'
243242
)
244243
245-
# There are no functioning wheels available for macOS 10.12 (as of
246-
# Sept 2020) for either pyqt5 (there are only wheels for 10.13+) or
247-
# pyside2 (the latest version (5.13.2) with 10.12 wheels has a
248-
# fatal to us bug, it was fixed in 5.14.0 which has 10.13 wheels)
249244
python -mpip install --upgrade pyqt5${{ matrix.pyqt5-ver }} &&
250245
python -c 'import PyQt5.QtCore' &&
251246
echo 'PyQt5 is available' ||
252247
echo 'PyQt5 is not available'
253-
if [[ "${{ runner.os }}" != 'macOS'
248+
# Even though PySide2 wheels can be installed on Python 3.12, they are broken and since PySide2 is
249+
# deprecated, they are unlikely to be fixed. For the same deprecation reason, there are no wheels
250+
# on M1 macOS, so don't bother there either.
251+
if [[ "${{ matrix.os }}" != 'macos-14'
254252
&& "${{ matrix.python-version }}" != '3.12' ]]; then
255253
python -mpip install --upgrade pyside2${{ matrix.pyside2-ver }} &&
256254
python -c 'import PySide2.QtCore' &&
257255
echo 'PySide2 is available' ||
258256
echo 'PySide2 is not available'
259257
fi
260-
if [[ "${{ runner.os }}" != 'macOS' ]]; then
261-
python -mpip install --upgrade pyqt6${{ matrix.pyqt6-ver }} &&
262-
python -c 'import PyQt6.QtCore' &&
263-
echo 'PyQt6 is available' ||
264-
echo 'PyQt6 is not available'
265-
fi
266-
if [[ "${{ runner.os }}" != 'macOS'
267-
&& "${{ matrix.python-version }}" != '3.12' ]]; then
268-
python -mpip install --upgrade pyside6${{ matrix.pyside6-ver }} &&
269-
python -c 'import PySide6.QtCore' &&
270-
echo 'PySide6 is available' ||
271-
echo 'PySide6 is not available'
272-
fi
258+
python -mpip install --upgrade pyqt6${{ matrix.pyqt6-ver }} &&
259+
python -c 'import PyQt6.QtCore' &&
260+
echo 'PyQt6 is available' ||
261+
echo 'PyQt6 is not available'
262+
python -mpip install --upgrade pyside6${{ matrix.pyside6-ver }} &&
263+
python -c 'import PySide6.QtCore' &&
264+
echo 'PySide6 is available' ||
265+
echo 'PySide6 is not available'
273266
274-
if [[ "${{ matrix.python-version }}" != '3.12' ]]; then
275-
python -mpip install --upgrade \
276-
-f "https://extras.wxpython.org/wxPython4/extras/linux/gtk3/${{ matrix.os }}" \
277-
wxPython &&
278-
python -c 'import wx' &&
279-
echo 'wxPython is available' ||
280-
echo 'wxPython is not available'
281-
fi
267+
python -mpip install --upgrade \
268+
-f "https://extras.wxpython.org/wxPython4/extras/linux/gtk3/${{ matrix.os }}" \
269+
wxPython &&
270+
python -c 'import wx' &&
271+
echo 'wxPython is available' ||
272+
echo 'wxPython is not available'
282273
283274
- name: Install the nightly dependencies
284275
# Only install the nightly dependencies during the scheduled event
@@ -319,7 +310,7 @@ jobs:
319310
- name: Run pytest
320311
run: |
321312
pytest -rfEsXR -n auto \
322-
--maxfail=50 --timeout=300 --durations=25 \
313+
--timeout=300 --durations=25 \
323314
--cov-report=xml --cov=lib --log-level=DEBUG --color=yes
324315
325316
- name: Filter C coverage

0 commit comments

Comments
 (0)