From 78465a7d37b5cd865cebbf88be004a4876b0233f Mon Sep 17 00:00:00 2001 From: Gerd Aschemann Date: Sat, 17 Aug 2024 16:46:10 +0200 Subject: [PATCH] WIP Enable Gradle debugging --- .github/workflows/test-java-os-mix.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-java-os-mix.yml b/.github/workflows/test-java-os-mix.yml index 69dc22ef..75f969c2 100644 --- a/.github/workflows/test-java-os-mix.yml +++ b/.github/workflows/test-java-os-mix.yml @@ -4,6 +4,9 @@ on: push: workflow_dispatch: +env: + GRADLE_DEBUG: '' + jobs: build-artifacts: uses: ./.github/workflows/build-artifacts.yml @@ -22,6 +25,15 @@ jobs: java-version: 8 runs-on: ${{ matrix.os-version }} steps: + - name: Detect and Set Debug Mode + run: | + if [ "${{ secrets.ACTIONS_RUNNER_DEBUG }}" == "true" ]; then + echo "GRADLE_DEBUG=--debug" >> $GITHUB_ENV + echo "Debug mode is enabled." + else + echo "Debug mode is not enabled." + fi + - name: Check out uses: actions/checkout@v4 @@ -45,7 +57,7 @@ jobs: run: | uname -a cd integration-test - ../gradlew integrationTest --scan + ../gradlew integrationTest --scan ${GRADLE_DEBUG} - name: Execute integration tests (Windows) if: runner.os == 'Windows' @@ -53,7 +65,9 @@ jobs: run: | uname -a cd integration-test - cmd /c "echo off && ..\gradlew.bat integrationTest --scan" + pwd + $gradle_debug = Get-Item "Env:GRADLE_DEBUG" + cmd /c "echo off && ..\gradlew.bat integrationTest --scan $gradle_debug" - name: Collect state upon failure (On Unix) if: failure() && runner.os != 'Windows'