Skip to content

Commit

Permalink
WIP Enable Gradle debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ascheman committed Aug 17, 2024
1 parent bd95a8a commit 8a29328
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/test-java-os-mix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
workflow_dispatch:

env:
GRADLE_DEBUG: ''

jobs:
build-artifacts:
uses: ./.github/workflows/build-artifacts.yml
Expand All @@ -22,6 +25,28 @@ jobs:
java-version: 8
runs-on: ${{ matrix.os-version }}
steps:
- name: Detect and Set Debug Mode (Unixes)
if: runner.os != 'Windows'
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: Detect and Set Debug Mode (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$debugMode = $env:ACTIONS_RUNNER_DEBUG
if ($debugMode -eq "true") {
echo "GRADLE_DEBUG=--debug" >> $env:GITHUB_ENV
echo "Debug mode is enabled."
} else {
echo "Debug mode is not enabled."
}
- name: Check out
uses: actions/checkout@v4

Expand All @@ -45,15 +70,17 @@ jobs:
run: |
uname -a
cd integration-test
../gradlew integrationTest --scan
../gradlew integrationTest --scan ${GRADLE_DEBUG}
- name: Execute integration tests (Windows)
if: runner.os == 'Windows'
shell: pwsh
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'
Expand Down

0 comments on commit 8a29328

Please sign in to comment.