From f3974197e88233e63543b21b0b69c6f1e1d77708 Mon Sep 17 00:00:00 2001 From: Philippe Charles Date: Tue, 15 Oct 2024 11:53:09 +0200 Subject: [PATCH] Fix headless tests in GitHub workflows --- .github/workflows/java-ea-maven.yml | 11 +++++++---- .github/workflows/java8-maven.yml | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/java-ea-maven.yml b/.github/workflows/java-ea-maven.yml index a690e85..1f7f485 100644 --- a/.github/workflows/java-ea-maven.yml +++ b/.github/workflows/java-ea-maven.yml @@ -31,7 +31,10 @@ jobs: java-version: ${{ matrix.java }} cache: 'maven' - - name: Build and (headless) test with Maven - uses: smithki/xvfb-action@v1.1.2 - with: - run: mvn -U -B -ntp verify + - name: Build and (headless) test with Maven (Linux) + if: ${{ runner.os == 'Linux' }} + run: xvfb-run mvn -U -B -ntp verify + + - name: Build and (headless) test with Maven (Windows and macOS) + if: ${{ runner.os != 'Linux' }} + run: mvn -U -B -ntp verify diff --git a/.github/workflows/java8-maven.yml b/.github/workflows/java8-maven.yml index 3bfc805..436f993 100644 --- a/.github/workflows/java8-maven.yml +++ b/.github/workflows/java8-maven.yml @@ -35,10 +35,13 @@ jobs: max_attempts: 3 timeout_minutes: 5 - - name: Build and (headless) test with Maven - uses: smithki/xvfb-action@v1.1.2 - with: - run: mvn -U -B -ntp verify + - name: Build and (headless) test with Maven (Linux) + if: ${{ runner.os == 'Linux' }} + run: xvfb-run mvn -U -B -ntp verify + + - name: Build and (headless) test with Maven (Windows and macOS) + if: ${{ runner.os != 'Linux' }} + run: mvn -U -B -ntp verify auto-merge-job: needs: build-and-test-job