Skip to content

Commit

Permalink
Install xvfb beforehand
Browse files Browse the repository at this point in the history
  • Loading branch information
deltamarnix committed Jan 24, 2024
1 parent 443c1f8 commit ef40de8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/qgis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:
- windows-latest
steps:
- uses: actions/checkout@v4
- name: Install xvfb
if: runner.os == 'Linux'
shell: bash
run: sudo apt update && sudo apt install -y xvfb
- uses: prefix-dev/[email protected]
with:
pixi-version: "latest"
Expand Down
26 changes: 14 additions & 12 deletions ribasim_qgis/scripts/run_qgis_tests.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import subprocess
import sys

xvfb = ["xvfb-run", "-a"] if sys.platform == "linux" else []
qgis_command = [
"qgis",
"--profiles-path",
".pixi/qgis_env",
"--version-migration",
"--nologo",
"--code",
"ribasim_qgis/scripts/qgis_testrunner.py",
"ribasim_qgis.tests",
]

qgis_process = subprocess.run(
[
"xvfb-run",
"-a",
"qgis",
"--profiles-path",
".pixi/qgis_env",
"--version-migration",
"--nologo",
"--code",
"ribasim_qgis/scripts/qgis_testrunner.py",
"ribasim_qgis.tests",
],
xvfb + qgis_command,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
text=True,
Expand Down

0 comments on commit ef40de8

Please sign in to comment.