From 1337e1a5fbc5f671e1a66c1e0d1e7bc9d4b4ebd8 Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Wed, 24 Mar 2021 14:46:23 +0700 Subject: Try to avoid 'HeadlessException: No X11 DISPLAY' on GitHub Actions We have 84 times this kind of exceptions in 'ajde' tests in our build logs on GitHub, even though the tests seem to pass: HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. I found this discussion: https://github.com/juliangruber/browser-run/issues/147 And then this GitHub Action: https://github.com/marketplace/actions/gabrielbb-xvfb-action Signed-off-by: Alexander Kriegisch --- .github/workflows/maven.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 8c5f8d035..26c6f148c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -34,4 +34,8 @@ jobs: run: ./mvnw -B -DskipTests package --file pom.xml - name: Run Tests - run: ./mvnw -B -Daspectj.tests.verbose=false verify --file pom.xml + # Tests in module ajde call Swing/AWT classes. Without frame buffer they throw + # HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. + uses: GabrielBB/xvfb-action@v1 + with: + run: ./mvnw -B -Daspectj.tests.verbose=false verify --file pom.xml -- cgit v1.2.3