Skip to content

ENH: Monitor the DISP field of records connected to by PyDMWritableWidget #8

ENH: Monitor the DISP field of records connected to by PyDMWritableWidget

ENH: Monitor the DISP field of records connected to by PyDMWritableWidget #8

Workflow file for this run

# This workflow will install pydm dependencies, lint with flake8, and run the test suite, for all combinations
# of operating systems and version numbers specified in the matrix
name: Build Status
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
if: ${{ github.repository == 'slaclab/pydm' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.7, 3.8, 3.9]
pyqt-version: [5.12.3, 5.15.7]
env:
DISPLAY: ':99.0'
QT_MAC_WANTS_LAYER: 1 # PyQT gui tests involving qtbot interaction on macOS will fail without this
steps:
- uses: actions/checkout@v3
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge
activate-environment: pydm-env
- name: Install python packages
shell: bash -el {0}
run: |
# Note the pinning of zipp here is because versions 3.16.0+ do not support python 3.7. Specifying zipp can be entirely removed (will be pulled in by flake8) if pydm drops support for 3.7
if [ "$RUNNER_OS" == "Windows" ]; then
mamba install flake8 zipp=3.15.0 pyqt=${{ matrix.pyqt-version }}
mamba install --file requirements.txt --file windows-dev-requirements.txt
else
mamba install flake8 zipp=3.15.0 pyqt=${{ matrix.pyqt-version }} $(cat requirements.txt dev-requirements.txt)
fi
- name: Install packages for testing a pyqt app on linux
shell: bash -el {0}
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt install xvfb herbstluftwm libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils
sudo /sbin/start-stop-daemon --start --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset
sleep 3
sudo /sbin/start-stop-daemon --start --pidfile /tmp/custom_herbstluftwm_99.pid --make-pidfile --background --exec /usr/bin/herbstluftwm
sleep 1
fi
- name: Lint with flake8
shell: bash -el {0}
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --max-line-length=120 --statistics
- name: Test with pytest
shell: bash -el {0}
run: |
python run_tests.py