ENH: Add Widgets to Data Model #225
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: Tests | |
on: | |
pull_request: | |
push: | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
max-parallel: 1 | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ['3.10'] | |
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@v4 | |
- name: Setup Miniforge | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-version: latest | |
activate-environment: pydm-converter-tool-dev | |
use-mamba: true | |
python-version: ${{ matrix.python-version }} | |
- name: Install libs 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: Install PyDMConverter | |
shell: bash -l {0} | |
run: | | |
pip install ".[dev]" | |
- name: Run Tests | |
shell: bash -l {0} | |
run: | | |
pytest | |
test-pypi-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install pypa/build | |
run: | | |
python -m pip install build --user | |
- name: Build a source tarball | |
run: | | |
python -m build --sdist --outdir dist/ . |