From 59b1c9edff66da626a1cc8b42b07b6288c5daf20 Mon Sep 17 00:00:00 2001 From: Daniel Price Date: Mon, 2 Dec 2024 14:00:16 +1100 Subject: [PATCH] (testsuite) set global DISPLAY variable in the actions --- .github/workflows/build.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43084c1..57d15d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,9 @@ jobs: matrix: os: [ubuntu-latest, macos-latest] + env: + DISPLAY: :99 + steps: # make sure we have gfortran installed and linked @@ -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; } \ No newline at end of file