From: Alexander Kriegisch Date: Wed, 24 Mar 2021 07:46:23 +0000 (+0700) Subject: Try to avoid 'HeadlessException: No X11 DISPLAY' on GitHub Actions X-Git-Tag: V1_9_7_M2~21^2~55 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1337e1a5fbc5f671e1a66c1e0d1e7bc9d4b4ebd8;p=aspectj.git 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 --- 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