Skip to content

ci: try to fix pyqt6 #80

ci: try to fix pyqt6

ci: try to fix pyqt6 #80

Workflow file for this run

name: Checks
on:
push:
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10']
os: [macos-latest, ubuntu-latest, windows-latest]
env:
# Display must be available globally for linux to know where xvfb is
DISPLAY: ":99.0"
QT_SELECT: "qt6"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup xvfb (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 libglib2.0-0 libgl1-mesa-dev
# # start xvfb in the background
# sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
- name: Install Python dependencies
run: |
# prerequisites
python -m pip install --upgrade pip wheel
python -m pip install coverage flake8 pytest pytest-qt
- name: Install package
run: |
pip install -e .
- name: List installed packages
run: |
pip freeze
- name: Test with pytest (Windows)
if: runner.os == 'Windows'
run: |
coverage run --source=mpl_data_cast -m pytest -x tests
- name: Test with pytest (Linux)
if: runner.os == 'Linux'
run: |
sudo xvfb-run --auto-servernum --server-num=1 --server-args="-screen 1 1920x1200x24 -ac +extension GLX" `which coverage` run --source=mpl_data_cast -m pytest -x tests
- name: Test with pytest without GUI tests (macOS)
if: runner.os == 'macOS'
run: |
coverage run --source=mpl_data_cast -m pytest -x -k "not gui" tests
- name: Lint with flake8
run: |
flake8 --exclude _version.py .
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3