Update webroot-matrix.yml #95
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Webroot Handling Matrix | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| macos-bash: | |
| name: MacOS Bash | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Run all webroot/execute combinations | |
| shell: bash | |
| env: | |
| LUCEE_VERSION_QUERY: 7/all/zero | |
| working-directory: ${{ github.workspace }}/tests/webroot | |
| run: | | |
| luceeVersionQuery="${LUCEE_VERSION_QUERY:-7/all/zero}" | |
| pwd | |
| webroots=( '.' "${{ github.workspace }}/tests/webroot" ) | |
| executes=( 'index.cfm' 'test.cfm' 'sub/test.cfm' ) | |
| failed=0 | |
| for w in "${webroots[@]}"; do | |
| for e in "${executes[@]}"; do | |
| echo "ant -buildfile ../../build.xml -Dwebroot=$w -Dexecute=\"$e\" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=$luceeVersionQuery" | |
| ant -buildfile ../../build.xml -Dwebroot=$w -Dexecute="$e" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery="$luceeVersionQuery" | |
| if [ $? -ne 0 ]; then | |
| failed=1 | |
| platform="macos-latest" | |
| shell="bash" | |
| echo -e "## Platform: $platform | Shell: $shell\n(pwd): $(pwd)\n### ant -buildfile build.xml -Dwebroot=$w -Dexecute=\"$e\" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=$luceeVersionQuery\nFAILED: $w / $e\n" >> "$GITHUB_STEP_SUMMARY" | |
| fi | |
| done | |
| done | |
| exit $failed | |
| ubuntu-bash: | |
| name: Ubuntu Bash | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Run all webroot/execute combinations | |
| shell: bash | |
| env: | |
| LUCEE_VERSION_QUERY: 7/all/zero | |
| working-directory: ${{ github.workspace }}/tests/webroot | |
| run: | | |
| luceeVersionQuery="${LUCEE_VERSION_QUERY:-7/all/zero}" | |
| pwd | |
| webroots=( '.' "${{ github.workspace }}/tests/webroot" ) | |
| executes=( 'index.cfm' 'test.cfm' 'sub/test.cfm' ) | |
| failed=0 | |
| for w in "${webroots[@]}"; do | |
| for e in "${executes[@]}"; do | |
| echo "ant -buildfile ../../build.xml -Dwebroot=$w -Dexecute=\"$e\" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=$luceeVersionQuery" | |
| ant -buildfile ../../build.xml -Dwebroot=$w -Dexecute="$e" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery="$luceeVersionQuery" | |
| if [ $? -ne 0 ]; then | |
| failed=1 | |
| platform="ubuntu-latest" | |
| shell="bash" | |
| echo -e "## Platform: $platform | Shell: $shell\n(pwd): $(pwd)\n### ant -buildfile build.xml -Dwebroot=$w -Dexecute=\"$e\" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=$luceeVersionQuery\nFAILED: $w / $e\n" >> "$GITHUB_STEP_SUMMARY" | |
| fi | |
| done | |
| done | |
| exit $failed | |
| windows-cmd: | |
| name: Windows CMD | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Run all webroot/execute combinations | |
| shell: cmd | |
| env: | |
| LUCEE_VERSION_QUERY: 7/all/zero | |
| working-directory: ${{ github.workspace }}/tests/webroot | |
| run: | | |
| @echo off | |
| echo starting full matrix test | |
| setlocal enabledelayedexpansion | |
| echo before first for loop (relative) | |
| for %%w in (.) do ( | |
| echo inside first for loop: %%w | |
| for %%e in (index.cfm test.cfm sub/test.cfm) do ( | |
| echo inside inner for loop: %%e | |
| ant -buildfile=..\..\build.xml "-Dwebroot=%%w" "-Dexecute=%%e" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=%LUCEE_VERSION_QUERY% | |
| if errorlevel 1 ( | |
| echo inside if errorlevel block | |
| set cmd=ant -buildfile=build.xml "-Dwebroot=%%w" "-Dexecute=%%e" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=%LUCEE_VERSION_QUERY% | |
| echo ## Platform: windows-latest ^| Shell: cmd>> %GITHUB_STEP_SUMMARY% | |
| echo (cd): %cd%>> %GITHUB_STEP_SUMMARY% | |
| echo ### %cmd%>> %GITHUB_STEP_SUMMARY% | |
| ) | |
| echo after if errorlevel block | |
| ) | |
| echo after inner for loop | |
| ) | |
| echo after first for loop | |
| echo before second for loop (absolute) | |
| for %%w in ("D:\work\script-runner\tests\webroot") do ( | |
| echo inside second for loop: %%w | |
| for %%e in (index.cfm test.cfm sub/test.cfm) do ( | |
| echo inside inner for loop: %%e | |
| ant -buildfile=..\..\build.xml "-Dwebroot=%%w" "-Dexecute=%%e" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=%LUCEE_VERSION_QUERY% | |
| if errorlevel 1 ( | |
| echo inside if errorlevel block | |
| set cmd=ant -buildfile=build.xml "-Dwebroot=%%w" "-Dexecute=%%e" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=%LUCEE_VERSION_QUERY% | |
| echo FAILED: %%w / %%e: !cmd!>> test-failures.txt | |
| ) | |
| echo after if errorlevel block | |
| ) | |
| echo after inner for loop | |
| ) | |
| echo after second for loop | |
| endlocal | |
| echo finished full matrix test | |
| windows-pwsh: | |
| name: Windows PowerShell | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Run all webroot/execute combinations | |
| shell: pwsh | |
| env: | |
| LUCEE_VERSION_QUERY: 7/all/zero | |
| working-directory: ${{ github.workspace }}/tests/webroot | |
| run: | | |
| $webroots = @('.', "${{ github.workspace }}\tests\webroot") | |
| pwd | |
| $executes = @('index.cfm', 'test.cfm', 'sub/test.cfm') | |
| foreach ($w in $webroots) { | |
| foreach ($e in $executes) { | |
| $luceeVersionQuery = $env:LUCEE_VERSION_QUERY | |
| $cmd = "ant -buildfile=../../build.xml `"-Dwebroot=$w`" `"-Dexecute=$e`" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=$luceeVersionQuery" | |
| Write-Host $cmd | |
| $LASTEXITCODE = 0 | |
| iex $cmd | |
| if ($LASTEXITCODE -ne 0) { | |
| $cmd = "ant -buildfile=../../build.xml `"-Dwebroot=$w`" `"-Dexecute=$e`" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=$luceeVersionQuery" | |
| $platform = "windows-latest" | |
| $shell = "pwsh" | |
| $summary = @() | |
| $summary += "## Platform: $platform | Shell: $shell" | |
| $summary += "(pwd): $(pwd)" | |
| $summary += "### $cmd" | |
| $summary += "FAILED: $w / $e" | |
| $summary -join "`n" | Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY | |
| } | |
| } | |
| } | |
| windows-bash: | |
| name: Windows Bash | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Run all webroot/execute combinations | |
| shell: bash | |
| env: | |
| LUCEE_VERSION_QUERY: 7/all/zero | |
| working-directory: ${{ github.workspace }}/tests/webroot | |
| run: | | |
| luceeVersionQuery="${LUCEE_VERSION_QUERY:-7/all/zero}" | |
| webroots=( '.' "${{ github.workspace }}/tests/webroot" ) | |
| executes=( 'index.cfm' 'test.cfm' 'sub/test.cfm' ) | |
| failed=0 | |
| for w in "${webroots[@]}"; do | |
| for e in "${executes[@]}"; do | |
| echo "ant -buildfile ../../build.xml -Dwebroot=$w -Dexecute=\"$e\" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=$luceeVersionQuery" | |
| ant -buildfile ../../build.xml -Dwebroot=$w -Dexecute="$e" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery="$luceeVersionQuery" | |
| if [ $? -ne 0 ]; then | |
| failed=1 | |
| platform="windows-latest" | |
| shell="bash" | |
| echo -e "## Platform: $platform | Shell: $shell\n### ant -buildfile build.xml -Dwebroot=$w -Dexecute=\"$e\" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=$luceeVersionQuery\nFAILED: $w / $e\n" >> "$GITHUB_STEP_SUMMARY" | |
| fi | |
| done | |
| done | |
| exit $failed |