Skip to content

feat: 3D mesh labeling (Canvas3D, brush-based vertex labeling) #28

feat: 3D mesh labeling (Canvas3D, brush-based vertex labeling)

feat: 3D mesh labeling (Canvas3D, brush-based vertex labeling) #28

Workflow file for this run

name: Tests
on:
push:
branches: [main, master]
tags: ['v*']
pull_request:
branches: [main, master]
workflow_call:
jobs:
test:
name: ${{ matrix.os }} / Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.11", "3.12", "3.13"]
env:
# Headless Qt — otherwise PyQt6 tries to talk to a display
QT_QPA_PLATFORM: offscreen
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install Qt system libraries (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libegl1 libxkbcommon-x11-0 libdbus-1-3 libxcb-cursor0 \
libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 \
libxcb-render-util0 libxcb-shape0 libxcb-xinerama0 libxcb-xkb1
- name: Install PyQt6 (macOS — pyproject.toml excludes it on Darwin)
if: runner.os == 'macOS'
run: python -m pip install "PyQt6>=6.7.0"
- name: Install package
run: |
python -m pip install --upgrade pip
pip install .
- name: Swap in vtk-osmesa (Linux, Python 3.11/3.12 — no wheel for 3.13 yet)
# Software-rendered VTK build; lets tests/test_canvas3d.py run its
# live-render-window tests safely with no display. The regular vtk
# wheel here can hard-crash the whole process (uncatchable native
# abort) instead of a clean test failure, so this MUST be the
# matching osmesa build, not just "some vtk". pyvista/pyvistaqt
# import vtk by name at runtime, not by pinned file hash, so they
# don't need reinstalling after the swap.
if: runner.os == 'Linux' && matrix.python-version != '3.13'
run: |
pip uninstall -y vtk
pip install --index-url https://wheels.vtk.org vtk-osmesa --no-deps
- name: Run unit tests
run: python -m unittest discover -s tests -v