Skip to content

add support for concurrent runs, better agent support, running a locally built jar #4

add support for concurrent runs, better agent support, running a locally built jar

add support for concurrent runs, better agent support, running a locally built jar #4

Workflow file for this run

name: Webroot Handling Matrix
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Run default test (index.cfm)
run: ant -Dwebroot=webroot -Dexecute=index.cfm
- name: Run subfolder test (sub/test.cfm)
run: ant -Dwebroot=webroot -Dexecute=sub/test.cfm
- name: Run test.cfm
run: ant -Dwebroot=webroot -Dexecute=test.cfm
# Add more steps for other argument combinations if needed
ubuntu-pwsh:
name: Ubuntu PowerShell
runs-on: ubuntu-latest
strategy:
matrix:
webroot:
- '.'
- "./webroot"
- "webroot"
- ${{ github.workspace }}/webroot
- '"./webroot"'
- '"${{ github.workspace }}/webroot"'
execute:
- "index.cfm"
- "test.cfm"
- "sub/test.cfm"
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Run Ant webroot test
shell: pwsh
run: |
ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
working-directory: ${{ github.workspace }}
- name: Check output
shell: pwsh
run: |
Select-String 'webroot test:' logs/* | Out-Null; if ($LASTEXITCODE -ne 0) { Write-Host 'webroot test output not found'; exit 1 }
working-directory: ${{ github.workspace }}
macos-bash:
name: MacOS Bash
runs-on: macos-latest
strategy:
matrix:
webroot:
- '.'
- "./webroot"
- "webroot"
- ${{ github.workspace }}/webroot
- '"./webroot"'
- '"${{ github.workspace }}/webroot"'
execute:
- "index.cfm"
- "test.cfm"
- "sub/test.cfm"
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Run Ant webroot test
shell: bash
run: |
ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
working-directory: ${{ github.workspace }}
- name: Check output
shell: bash
run: |
grep 'webroot test:' logs/* || (echo 'webroot test output not found' && exit 1)
working-directory: ${{ github.workspace }}
macos-pwsh:
name: MacOS PowerShell
runs-on: macos-latest
strategy:
matrix:
webroot:
- '.'
- "./webroot"
- "webroot"
- ${{ github.workspace }}/webroot
- '"./webroot"'
- '"${{ github.workspace }}/webroot"'
execute:
- "index.cfm"
- "test.cfm"
- "sub/test.cfm"
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Run Ant webroot test
shell: pwsh
run: |
ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
working-directory: ${{ github.workspace }}
- name: Check output
shell: pwsh
run: |
Select-String 'webroot test:' logs/* | Out-Null; if ($LASTEXITCODE -ne 0) { Write-Host 'webroot test output not found'; exit 1 }
working-directory: ${{ github.workspace }}
windows-cmd:
name: Windows CMD
runs-on: windows-latest
strategy:
matrix:
webroot:
- '.'
- "./webroot"
- "webroot"
- ${{ github.workspace }}\webroot
- '"./webroot"'
- '"${{ github.workspace }}\\webroot"'
execute:
- "index.cfm"
- "test.cfm"
- "sub/test.cfm"
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Run Ant webroot test
shell: cmd
run: |
ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
working-directory: ${{ github.workspace }}
- name: Check output
shell: cmd
run: |
findstr "webroot test:" logs\* || (echo webroot test output not found && exit 1)
working-directory: ${{ github.workspace }}
windows-pwsh:
name: Windows PowerShell
runs-on: windows-latest
strategy:
matrix:
webroot:
- '.'
- "./webroot"
- "webroot"
- ${{ github.workspace }}\webroot
- '"./webroot"'
- '"${{ github.workspace }}\\webroot"'
execute:
- "index.cfm"
- "test.cfm"
- "sub/test.cfm"
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Run Ant webroot test
shell: pwsh
run: |
ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
working-directory: ${{ github.workspace }}
- name: Check output
shell: pwsh
run: |
Select-String 'webroot test:' logs/* | Out-Null; if ($LASTEXITCODE -ne 0) { Write-Host 'webroot test output not found'; exit 1 }
working-directory: ${{ github.workspace }}
windows-bash:
name: Windows Bash
runs-on: windows-latest
strategy:
matrix:
webroot:
- '.'
- "./webroot"
- "webroot"
- ${{ github.workspace }}/webroot
- '"./webroot"'
- '"${{ github.workspace }}/webroot"'
execute:
- "index.cfm"
- "test.cfm"
- "sub/test.cfm"
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Run Ant webroot test
shell: bash
run: |
ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
working-directory: ${{ github.workspace }}
- name: Check output
shell: bash
run: |
grep 'webroot test:' logs/* || (echo 'webroot test output not found' && exit 1)
working-directory: ${{ github.workspace }}