# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
envlist = py{39,310,311}-{PyQt5,PySide2,PyQt6,PySide6}-napari_{latest,repo}
toxworkdir=/tmp/.tox
isolated_build = true

[gh-actions]
python =
    3.8: py38
    3.9: py39
    3.10: py310
    3.11: py311

[gh-actions:env]
NAPARI =
    latest: napari_latest
    repo: napari_repo
BACKEND =
    pyqt: PyQt5
    pyside: PySide2
    PyQt5: PyQt5
    PySide2: PySide2
    PyQt6: PyQt6
    PySide6: PySide6

[testenv]
passenv =
    QT_API
    CI
    GITHUB_ACTIONS
    AZURE_PIPELINES
    DISPLAY
    XAUTHORITY
    NUMPY_EXPERIMENTAL_ARRAY_FUNCTION
    PYVISTA_OFF_SCREEN
deps = 
    PyQt5: PyQt5!=5.15.0
    PyQt5: PyQt5-sip!=12.12.0
    PySide2: PySide2!=5.15.0
    PyQt6: PyQt6
    # fix PySide6 when a new napari release is out
    PySide6: PySide6 != 6.4.3, !=6.5.0, !=6.5.1, !=6.5.1.1, !=6.5.2, != 6.5.3, != 6.6.0, != 6.6.1, != 6.6.2 ; python_version >= '3.10' and python_version < '3.12'
    PySide2: npe2!=0.2.2
    napari_repo: git+https://github.com/napari/napari.git
    napari_latest: napari
extras = testing
commands = pytest -v --color=yes --cov=napari_plugin_manager --cov-report=xml
