Skip to content

add mac-latest tests #12

add mac-latest tests

add mac-latest tests #12

Workflow file for this run

name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.12"]
os: [windows-latest, ubuntu-latest, mac-latest]
env:
DISPLAY: ":99.0"
QT_SELECT: "qt6"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup xvfb (Linux)
if: runner.os == 'Linux'
run: |
# https://stackoverflow.com/questions/60692711/cant-create-python-qapplication-in-github-action
sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 libxcb-shape0 libglib2.0-0 libgl1-mesa-dev
sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
# start xvfb in the background
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-qt
python -m pip install -e .
- name: Test with pytest
run: |
pytest