DEP: drop support for CPython 3.9 #63
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Test" | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
jobs: | |
unit-test-and-typecheck: | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
python-version: | |
- "3.11" | |
- "3.10" | |
pyqt-dependency: | |
- "PyQt6" | |
- "PySide6" | |
steps: | |
- uses: "actions/checkout@v3" | |
- name: "Set up Python ${{ matrix.python-version }}" | |
uses: "actions/setup-python@v4" | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: "Install test and project dependencies" | |
run: | | |
# Project dependencies from pyproject.toml | |
# NOTE: Also builds viscm. How do we avoid this? | |
pip install . | |
# Test dependencies | |
pip install pytest pytest-cov pytest-qt pytest-xvfb ${{ matrix.pyqt-dependency }} | |
# pytest-qt CI dependencies: https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions | |
sudo apt update | |
sudo apt install -y \ | |
xvfb libegl1 \ | |
libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils \ | |
libxcb-cursor0 | |
- name: "Run tests" | |
run: "make test" | |
env: | |
# In Pythons >= 3.10, tests fail with `RuntimeError: Invalid DISPLAY | |
# variable`, unless this variable is set: | |
MPLBACKEND: "Agg" | |
- name: "Install mypy" | |
run: "pip install mypy>=1.3" | |
- name: "Run typechecker" | |
run: "make typecheck" |