Skip to content

Commit

Permalink
MNT: make gh actions setup use conda and pip to install packages
Browse files Browse the repository at this point in the history
Before it was using the pip '.txt' package files to install things
using conda instead. But this doesn't mimic how users locally install
packages with conda+pip, and some packages in coda (ex=p4p) are outdated
compared to pip.
  • Loading branch information
nstelter-slac committed Jan 6, 2025
1 parent dd6f38a commit a00a4d7
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,35 @@ jobs:
miniforge-variant: Miniforge3
miniforge-version: latest
activate-environment: pydm-env
- name: Install python packages

- name: Install PyDM with Mamba
shell: bash -el {0}
run: |
mamba install -c conda-forge pydm pyqt=${{ matrix.pyqt-version }}
- name: Install additional Python dependencies with pip
shell: bash -el {0}
run: |
pip install -r requirements.txt
if [ "$RUNNER_OS" == "Windows" ]; then
mamba install pyqt=${{ matrix.pyqt-version }}
mamba install --file requirements.txt --file windows-dev-requirements.txt
pip install -r windows-dev-requirements.txt
else
mamba install pyqt=${{ matrix.pyqt-version }} $(cat requirements.txt dev-requirements.txt)
pip install -r dev-requirements.txt
fi
- name: Install packages for testing a pyqt app on linux
- 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 apt update
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
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: Test with pytest
shell: bash -el {0}
run: |
python run_tests.py
python run_tests.py

0 comments on commit a00a4d7

Please sign in to comment.