Skip to content

Commit

Permalink
Trying headless GUI unit tests [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
dbouget committed Oct 31, 2023
1 parent 335ae4f commit 12ca768
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
with:
python-version: "3.8"

- name: Setup OpenGL
run: |
apt update && apt install -y sudo
sudo apt install -y '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
- name: Download ANTs
uses: robinraju/release-downloader@main
with:
Expand Down Expand Up @@ -53,12 +58,16 @@ jobs:
mkdir tmp_dependencies
pyinstaller --log-level INFO --noconfirm --clean assets/main.spec
# - name: Test executable
# run: QT_QPA_PLATFORM="offscreen" ./dist/Raidionics/Raidionics & sleep 5; kill -INT %+
# shell: bash
#
# - name: Test GUI startup
# run: cd ${{github.workspace}}/tests && python software_launch_test.py
- name: Test executable
env:
DISPLAY: ':1'
run: QT_QPA_PLATFORM="offscreen" ./dist/Raidionics/Raidionics & sleep 5; kill -INT %+
shell: bash

- name: Test GUI startup
env:
DISPLAY: ':1'
run: cd ${{github.workspace}}/tests && python software_launch_test.py

- name: Make installer
run: |
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/build_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ jobs:
- name: Debug clinfo
run: clinfo

- name: Setup X virtual framebuffer
run: sudo apt-get install -y xvfb

- name: Download ANTs
uses: robinraju/release-downloader@main
with:
Expand Down Expand Up @@ -83,20 +80,16 @@ jobs:
mkdir tmp_dependencies
pyinstaller --log-level INFO --noconfirm --clean assets/main.spec
- name: Test executable xvfb
- name: Test executable
env:
DISPLAY: ':1'
run: xvfb-run ./dist/Raidionics/Raidionics & sleep 5; kill -INT %+
run: QT_QPA_PLATFORM="offscreen" ./dist/Raidionics/Raidionics & sleep 5; kill -INT %+
shell: bash

- name: Test executable
- name: Test GUI startup
env:
DISPLAY: ':1'
run: QT_QPA_PLATFORM="offscreen" ./dist/Raidionics/Raidionics & sleep 5; kill -INT %+
shell: bash
#
# - name: Test GUI startup
# run: cd ${{github.workspace}}/tests && python software_launch_test.py
run: cd ${{github.workspace}}/tests && python software_launch_test.py

- name: Make installer
run: |
Expand Down

0 comments on commit 12ca768

Please sign in to comment.