Skip to content

Commit 2e0a4b6

Browse files
Merge pull request #1286 from nstelter-slac/pyside6_in_automation
MNT/TST: add pyside6 testing runs to gh-actions automation
2 parents 529504c + 44b2178 commit 2e0a4b6

File tree

3 files changed

+91
-6
lines changed

3 files changed

+91
-6
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# This workflow will install pydm dependencies and run the test suite for all combinations
1+
# This workflow will install pydm dependencies and run the test suite using PyQt5 for all combinations
22
# of operating systems and version numbers specified in the matrix
33

4-
name: Build Status
4+
name: PyQt5 Testing
55

66
on:
77
push:
@@ -13,7 +13,7 @@ permissions:
1313
contents: read
1414

1515
jobs:
16-
build:
16+
test-pyqt5:
1717
if: ${{ github.repository == 'slaclab/pydm' }}
1818
runs-on: ${{ matrix.os }}
1919
strategy:
@@ -46,7 +46,7 @@ jobs:
4646
conda-remove-defaults: true
4747
architecture: x64 # Ensure macOS finds PyQt 5.12.3 which isn't available with osx-arm64
4848

49-
- name: Install PyDM with Mamba
49+
- name: Install PyDM with PyQt5
5050
shell: bash -el {0}
5151
run: |
5252
if [ "$RUNNER_OS" == "Windows" ]; then
@@ -66,7 +66,7 @@ jobs:
6666
pip install .[test-no-optional]
6767
fi
6868
69-
- name: Install packages for testing a PyQt app on Linux
69+
- name: Install packages for testing a PyQt/PySide app on Linux
7070
shell: bash -el {0}
7171
run: |
7272
if [ "$RUNNER_OS" == "Linux" ]; then
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# This workflow will install pydm dependencies and run the test suite using PySide6 for all combinations
2+
# of operating systems and version numbers specified in the matrix
3+
4+
name: PySide6 Testing
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
test-pyside6:
17+
if: ${{ github.repository == 'slaclab/pydm' }}
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [ubuntu-latest, windows-latest, macos-latest]
23+
python-version: ["3.12"]
24+
25+
env:
26+
DISPLAY: ':99.0'
27+
QT_MAC_WANTS_LAYER: 1
28+
QT_API: pyside6
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: Setup conda
34+
uses: conda-incubator/setup-miniconda@v3
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
miniforge-variant: Miniforge3
38+
miniforge-version: latest
39+
activate-environment: pydm-env
40+
conda-remove-defaults: true
41+
architecture: x64
42+
43+
- name: Install PyDM with PySide6
44+
shell: bash -el {0}
45+
run: |
46+
if [ "$RUNNER_OS" == "Windows" ]; then
47+
conda install -c conda-forge pydm pyside6
48+
elif [ "$RUNNER_OS" == "macOS" ]; then
49+
mamba install -c conda-forge pydm pyside6 git pyca
50+
else
51+
mamba install -c conda-forge pydm pyside6 pyca
52+
fi
53+
54+
- name: Install additional Python dependencies with pip
55+
shell: bash -el {0}
56+
run: |
57+
if [ "$RUNNER_OS" == "Linux" ]; then
58+
pip install .[test]
59+
else
60+
pip install .[test-no-optional]
61+
fi
62+
63+
- name: Install packages for testing a PyQt/PySide app on Linux
64+
shell: bash -el {0}
65+
run: |
66+
if [ "$RUNNER_OS" == "Linux" ]; then
67+
sudo apt update
68+
sudo apt install -y xvfb herbstluftwm libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils
69+
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
70+
sleep 3
71+
sudo /sbin/start-stop-daemon --start --pidfile /tmp/custom_herbstluftwm_99.pid --make-pidfile --background --exec /usr/bin/herbstluftwm
72+
sleep 1
73+
fi
74+
75+
- name: Test with pytest
76+
shell: bash -el {0}
77+
timeout-minutes: 30
78+
continue-on-error: true # remove this once all pyside6 tests pass!
79+
run: |
80+
if [ "$RUNNER_OS" == "macOS" ]; then
81+
python run_tests.py --ignore=pydm/tests/data_plugins/test_p4p_plugin_component.py --ignore=pydm/tests/widgets/test_slider.py # disable just for now, until fix intermittent issue
82+
else
83+
python run_tests.py
84+
fi

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
[![Build Status](https://github.com/slaclab/pydm/actions/workflows/run-tests.yml/badge.svg?branch=master)](https://github.com/slaclab/pydm/actions/workflows/run-tests.yml)
1+
[![Build Status: PySide6](https://github.com/slaclab/pydm/actions/workflows/run-tests-pyqt5.yml/badge.svg?branch=master)](https://github.com/slaclab/pydm/actions/workflows/run-tests-pyqt5.yml)
2+
[![Build Status: PyQt5](https://github.com/slaclab/pydm/actions/workflows/run-tests-pyside6.yml/badge.svg?branch=master)](https://github.com/slaclab/pydm/actions/workflows/run-tests-pyside6.yml)
23

34
![PyDM: Python Display Manager](pydm_banner_full.png)
45

0 commit comments

Comments
 (0)