Skip to content

Commit c903915

Browse files
committed
improve webroot handling, add tests
1 parent 8a3bd15 commit c903915

8 files changed

Lines changed: 436 additions & 48 deletions

File tree

Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
name: Webroot Handling Matrix
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
ubuntu-bash:
10+
name: Ubuntu Bash
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
webroot:
15+
- '.'
16+
- "./webroot"
17+
- "webroot"
18+
- ${{ github.workspace }}/webroot
19+
- '"./webroot"'
20+
- '"${{ github.workspace }}/webroot"'
21+
execute:
22+
- "index.cfm"
23+
- "test.cfm"
24+
- "sub/test.cfm"
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Set up Java
28+
uses: actions/setup-java@v4
29+
with:
30+
distribution: 'temurin'
31+
java-version: '21'
32+
- name: Run Ant webroot test
33+
shell: bash
34+
run: |
35+
ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
36+
working-directory: ${{ github.workspace }}
37+
- name: Check output
38+
shell: bash
39+
run: |
40+
grep 'webroot test:' logs/* || (echo 'webroot test output not found' && exit 1)
41+
working-directory: ${{ github.workspace }}
42+
43+
ubuntu-pwsh:
44+
name: Ubuntu PowerShell
45+
runs-on: ubuntu-latest
46+
strategy:
47+
matrix:
48+
webroot:
49+
- '.'
50+
- "./webroot"
51+
- "webroot"
52+
- ${{ github.workspace }}/webroot
53+
- '"./webroot"'
54+
- '"${{ github.workspace }}/webroot"'
55+
execute:
56+
- "index.cfm"
57+
- "test.cfm"
58+
- "sub/test.cfm"
59+
steps:
60+
- uses: actions/checkout@v4
61+
- name: Set up Java
62+
uses: actions/setup-java@v4
63+
with:
64+
distribution: 'temurin'
65+
java-version: '21'
66+
- name: Run Ant webroot test
67+
shell: pwsh
68+
run: |
69+
ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
70+
working-directory: ${{ github.workspace }}
71+
- name: Check output
72+
shell: pwsh
73+
run: |
74+
Select-String 'webroot test:' logs/* | Out-Null; if ($LASTEXITCODE -ne 0) { Write-Host 'webroot test output not found'; exit 1 }
75+
working-directory: ${{ github.workspace }}
76+
77+
macos-bash:
78+
name: MacOS Bash
79+
runs-on: macos-latest
80+
strategy:
81+
matrix:
82+
webroot:
83+
- '.'
84+
- "./webroot"
85+
- "webroot"
86+
- ${{ github.workspace }}/webroot
87+
- '"./webroot"'
88+
- '"${{ github.workspace }}/webroot"'
89+
execute:
90+
- "index.cfm"
91+
- "test.cfm"
92+
- "sub/test.cfm"
93+
steps:
94+
- uses: actions/checkout@v4
95+
- name: Set up Java
96+
uses: actions/setup-java@v4
97+
with:
98+
distribution: 'temurin'
99+
java-version: '21'
100+
- name: Run Ant webroot test
101+
shell: bash
102+
run: |
103+
ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
104+
working-directory: ${{ github.workspace }}
105+
- name: Check output
106+
shell: bash
107+
run: |
108+
grep 'webroot test:' logs/* || (echo 'webroot test output not found' && exit 1)
109+
working-directory: ${{ github.workspace }}
110+
111+
macos-pwsh:
112+
name: MacOS PowerShell
113+
runs-on: macos-latest
114+
strategy:
115+
matrix:
116+
webroot:
117+
- '.'
118+
- "./webroot"
119+
- "webroot"
120+
- ${{ github.workspace }}/webroot
121+
- '"./webroot"'
122+
- '"${{ github.workspace }}/webroot"'
123+
execute:
124+
- "index.cfm"
125+
- "test.cfm"
126+
- "sub/test.cfm"
127+
steps:
128+
- uses: actions/checkout@v4
129+
- name: Set up Java
130+
uses: actions/setup-java@v4
131+
with:
132+
distribution: 'temurin'
133+
java-version: '21'
134+
- name: Run Ant webroot test
135+
shell: pwsh
136+
run: |
137+
ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
138+
working-directory: ${{ github.workspace }}
139+
- name: Check output
140+
shell: pwsh
141+
run: |
142+
Select-String 'webroot test:' logs/* | Out-Null; if ($LASTEXITCODE -ne 0) { Write-Host 'webroot test output not found'; exit 1 }
143+
working-directory: ${{ github.workspace }}
144+
145+
windows-cmd:
146+
name: Windows CMD
147+
runs-on: windows-latest
148+
strategy:
149+
matrix:
150+
webroot:
151+
- '.'
152+
- "./webroot"
153+
- "webroot"
154+
- ${{ github.workspace }}\webroot
155+
- '"./webroot"'
156+
- '"${{ github.workspace }}\\webroot"'
157+
execute:
158+
- "index.cfm"
159+
- "test.cfm"
160+
- "sub/test.cfm"
161+
steps:
162+
- uses: actions/checkout@v4
163+
- name: Set up Java
164+
uses: actions/setup-java@v4
165+
with:
166+
distribution: 'temurin'
167+
java-version: '21'
168+
- name: Run Ant webroot test
169+
shell: cmd
170+
run: |
171+
ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
172+
working-directory: ${{ github.workspace }}
173+
- name: Check output
174+
shell: cmd
175+
run: |
176+
findstr "webroot test:" logs\* || (echo webroot test output not found && exit 1)
177+
working-directory: ${{ github.workspace }}
178+
179+
windows-pwsh:
180+
name: Windows PowerShell
181+
runs-on: windows-latest
182+
strategy:
183+
matrix:
184+
webroot:
185+
- '.'
186+
- "./webroot"
187+
- "webroot"
188+
- ${{ github.workspace }}\webroot
189+
- '"./webroot"'
190+
- '"${{ github.workspace }}\\webroot"'
191+
execute:
192+
- "index.cfm"
193+
- "test.cfm"
194+
- "sub/test.cfm"
195+
steps:
196+
- uses: actions/checkout@v4
197+
- name: Set up Java
198+
uses: actions/setup-java@v4
199+
with:
200+
distribution: 'temurin'
201+
java-version: '21'
202+
- name: Run Ant webroot test
203+
shell: pwsh
204+
run: |
205+
ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
206+
working-directory: ${{ github.workspace }}
207+
- name: Check output
208+
shell: pwsh
209+
run: |
210+
Select-String 'webroot test:' logs/* | Out-Null; if ($LASTEXITCODE -ne 0) { Write-Host 'webroot test output not found'; exit 1 }
211+
working-directory: ${{ github.workspace }}
212+
213+
windows-bash:
214+
name: Windows Bash
215+
runs-on: windows-latest
216+
strategy:
217+
matrix:
218+
webroot:
219+
- '.'
220+
- "./webroot"
221+
- "webroot"
222+
- ${{ github.workspace }}/webroot
223+
- '"./webroot"'
224+
- '"${{ github.workspace }}/webroot"'
225+
execute:
226+
- "index.cfm"
227+
- "test.cfm"
228+
- "sub/test.cfm"
229+
steps:
230+
- uses: actions/checkout@v4
231+
- name: Set up Java
232+
uses: actions/setup-java@v4
233+
with:
234+
distribution: 'temurin'
235+
java-version: '21'
236+
- name: Run Ant webroot test
237+
shell: bash
238+
run: |
239+
ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
240+
working-directory: ${{ github.workspace }}
241+
- name: Check output
242+
shell: bash
243+
run: |
244+
grep 'webroot test:' logs/* || (echo 'webroot test output not found' && exit 1)
245+
working-directory: ${{ github.workspace }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ lucee-download-cache
22
temp
33
bin
44
logs
5+
/temp-unique
6+
/agent-tests

0 commit comments

Comments
 (0)