Skip to content

Commit

Permalink
(testsuite) set global DISPLAY variable in the actions
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljprice committed Dec 2, 2024
1 parent 4ab1a63 commit 59b1c9e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]

env:
DISPLAY: :99

steps:

# make sure we have gfortran installed and linked
Expand All @@ -34,17 +37,17 @@ jobs:
sudo make install
# Set up Xvfb for graphical tests
- name: Set up and start Xvfb
- name: Install Xvfb to pretend to launch X-windows in the workflow
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y xvfb
Xvfb :99 -screen 0 1920x1080x24 &
export DISPLAY=:99
# Run tests
- name: Run test programs, pressing enter to all prompts
if: matrix.os == 'ubuntu-latest'
run: |
Xvfb :99 -screen 0 1920x1080x24 &
echo "Current DISPLAY: $DISPLAY"
yes "" | make check || { echo "Tests failed. Printing test-suite.log..."; cat test/C/test-suite.log; exit 1; }

0 comments on commit 59b1c9e

Please sign in to comment.