Skip to content

Commit 7d6b106

Browse files
authored
GHA: test app launch (#166)
The minimum testing we can do is checking that the GUI can be launched. Closes #118.
1 parent 42ae98c commit 7d6b106

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,46 @@ jobs:
2222

2323
- name: Run pre-commit hooks
2424
run: pre-commit run --all-files
25+
26+
launch:
27+
runs-on: ubuntu-latest
28+
strategy:
29+
matrix:
30+
python-version: ['3.11', '3.13']
31+
steps:
32+
- name: Check out repository
33+
uses: actions/checkout@v5
34+
35+
- name: Prepare Python
36+
uses: actions/setup-python@v6
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
40+
- name: Install dependencies
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y xvfb libegl1 libqt6gui6 libxcb-cursor0
44+
45+
- name: Install PEtabGUI
46+
run: |
47+
python -m pip install --upgrade pip
48+
pip install .
49+
50+
- name: Launch GUI
51+
# Ensure that we can launch the GUI
52+
run: |
53+
echo "Launching Xvfb"
54+
Xvfb :99 -screen 0 1920x1200x24 &
55+
export DISPLAY=:99
56+
echo "Running petab_gui --version"
57+
petab_gui --version
58+
echo "Running petab_gui without arguments"
59+
petab_gui &
60+
echo $! > petabgui_pid.txt
61+
sleep 10
62+
kill $(cat petabgui_pid.txt)
63+
echo "Running petab_gui with example problem"
64+
petab_gui example/problem.yaml &
65+
echo $! > petabgui_pid.txt
66+
sleep 10
67+
kill $(cat petabgui_pid.txt)

0 commit comments

Comments
 (0)