Skip to content

Commit

Permalink
Update coverage.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
meowmeowahr authored Sep 12, 2024
1 parent fb22587 commit 15bc818
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Run tests and upload coverage
on:
push

env:
# Display must be available globally for linux to know where xvfb is
DISPLAY: ":99.0"
QT_SELECT: "qt6"

jobs:
test:
name: Run tests and collect coverage
Expand All @@ -16,11 +21,14 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4

- name: Install EGL mesa
- name: Setup xvfb (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update -y -qq
sudo apt-get install -y -qq libegl1-mesa libegl1-mesa-dev xvfb x11-utils libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0
# Stuff copied wildly from several stackoverflow posts
sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 libxcb-shape0 libglib2.0-0 libgl1-mesa-dev
sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
# start xvfb in the background
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
- name: Install dependencies
run: pip install pytest pytest-cov pytest-qt && pip install -r requirements.txt

Expand Down

0 comments on commit 15bc818

Please sign in to comment.