Skip to content

Commit 0872f3d

Browse files
committed
test: use Java 11 and add minimal CommandBox test workflow
- Switch to Java 11 (more stable with CommandBox) - Add separate test-commandbox.yml for isolated testing - Simpler test to verify basic CommandBox functionality
1 parent 4e1a42c commit 0872f3d

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Test CommandBox
2+
on:
3+
push:
4+
branches:
5+
- feat/docker-local-testing
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Setup Java
12+
uses: actions/setup-java@v4
13+
with:
14+
distribution: "temurin"
15+
java-version: "11"
16+
17+
- name: Setup CommandBox
18+
uses: Ortus-Solutions/setup-commandbox@v2.0.1
19+
with:
20+
version: "6.2.1"
21+
22+
- name: Test CommandBox
23+
run: |
24+
echo "=== Environment ==="
25+
java -version
26+
echo "PATH: $PATH"
27+
28+
echo -e "\n=== CommandBox Test ==="
29+
which box || echo "box not found"
30+
box version || echo "box version failed"
31+
32+
echo -e "\n=== Simple Server Test ==="
33+
mkdir test
34+
cd test
35+
echo '<cfoutput>Hello World!</cfoutput>' > index.cfm
36+
37+
# Start server with explicit timeout
38+
timeout 60s box server start port=8080 --console || {
39+
echo "Server start failed or timed out"
40+
box server list
41+
}
42+
43+
# Test the server
44+
sleep 10
45+
curl -f http://localhost:8080/ || echo "Server test failed"
46+
47+
# Stop server
48+
box server stop

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
cfengine: ["lucee@6"]
2020
dbengine: ["h2"]
2121
commandbox_version: ["6.2.1"]
22-
jdkVersion: ["21"]
22+
jdkVersion: ["11"] # Try Java 11 instead of 21
2323
experimental: [false]
2424
# Original matrix commented out for now
2525
# cfengine:

0 commit comments

Comments
 (0)