Skip to content

Commit

Permalink
Use Xvfb to run tests only on ubuntu-latest
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Dec 28, 2023
1 parent 8445fd2 commit 6dbac3c
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,18 @@ jobs:
- name: Test with pytest
shell: bash -l {0}
if: matrix.os != 'windows-latest' && !(matrix.os == 'macos-latest' && matrix.PYTEST_QT_API == 'pyside2')
if: matrix.os == 'ubuntu-latest'
env:
PYTEST_QT_API: ${{ matrix.PYTEST_QT_API }}
MPLBACKEND: 'agg'
run: |
# # open virtual display
# if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
# export DISPLAY=:99.0
# /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX +render -noreset
# (herbstluftwm )&
# else
# (sudo Xvfb :99 -ac -screen 0 1024x768x8 )&
# fi
pytest -vs -m 'not gui' tests/
sudo apt-get update
sudo apt-get install -y xvfb libxkbcommon-x11-0 libqt5widgets5
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
export DISPLAY=:99
pytest tests
- name: Run examples
shell: bash -l {0}
Expand Down

0 comments on commit 6dbac3c

Please sign in to comment.