Skip to content

All the cool kids are using uv now, lets try it #171

All the cool kids are using uv now, lets try it

All the cool kids are using uv now, lets try it #171

Workflow file for this run

name: Tests
on:
push:
branches:
- master
- develop
pull_request:
branches:
- "*"
concurrency:
group: tests-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
tests:
name: ${{ matrix.os }} / ${{ matrix.python-version }} / ${{ matrix.qt-version }}
runs-on: ${{ matrix.image }}
strategy:
matrix:
os: [ubuntu]
python-version: ["3.8", "3.9", "3.10", "3.11"]
qt-version: ["pyside2", "pyside6", "pyqt5", "pyqt6"]
include:
- os: ubuntu
image: ubuntu-24.04
# - os: windows
# image: windows-2022
# - os: macos-x86_64
# image: macos-13
# - os: macos-arm64
# image: macos-14
exclude:
# pyside2 does not publish arm64 packages
- os: macos-arm64
qt-version: pyside2
- python-version: "3.11"
qt-version: pyside2
- python-version: "3.12"
qt-version: pyside2
- python-version: "3.13"
qt-version: pyside2
- python-version: "3.8"
qt-version: pyside6
- python-version: "3.8"
qt-version: pyqt6
fail-fast: false
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
- name: Install libxcb dependencies
if: ${{ matrix.os == 'ubuntu' }}
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get -qq update
sudo apt-get -qq install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libegl-dev
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.8.3"
enable-cache: false
- name: Test all Python/Qt combinations
uses: coactions/setup-xvfb@v1
with:
run: |
PYTHON_VERSIONS=("3.10", "3.11")
QT_VERSIONS=("pyside2", "pyside6", "pyqt5", "pyqt6")
for PY in "${PYTHON_VERSIONS[@]}"; do
uv venv --clear
uv python pin "$PY"
for QT in "${QT_VERSIONS[@]}"; do
# pyside2 requires python <3.11
if [[ "$QT" == "pyside2" && ( "$PY" == "3.11" || "$PY" == "3.12" || "$PY" == "3.13" ) ]]; then continue; fi
# pyside6 and pyqt6 require python >=3.9
if [[ "$QT" == "pyside6" || "$QT" == "pyqt6" ]] && [[ "$PY" == "3.8" ]]; then continue; fi
uv sync --locked --dev
uv pip install "$QT"
QT_API="$QT" uv run coverage run -m pytest --verbose tests/
done
done
# combine-coverage:
# needs: tests
# name: combine and report coverage
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v4
# - run: pip install coverage
#
# - name: Download all coverage artifacts
# uses: actions/download-artifact@v4
# with:
# path: coverage-artifacts
#
# - name: Comment with coverage report
# uses: MishaKav/pytest-coverage-comment@v1