@@ -306,9 +306,18 @@ jobs:
306306 fi
307307 }
308308
309- # Simplified server start
310- echo -e "\nAttempting server start..."
311- box server start name=test port=60006 --force || echo "Server start failed"
309+ # Use the approach that worked in minimal test
310+ echo -e "\nCreating simple test directory..."
311+ mkdir -p commandbox-test
312+ cd commandbox-test
313+ echo '<cfoutput>Test Server Running!</cfoutput>' > index.cfm
314+
315+ # Start server like in the successful test
316+ echo "Starting server on port 60006..."
317+ timeout 60s box server start port=60006 --console || {
318+ echo "Server start failed or timed out"
319+ box server list
320+ }
312321
313322 # Ensure the public directory exists
314323 if [ ! -d "public" ]; then
@@ -445,56 +454,34 @@ jobs:
445454 run : |
446455 cd ./tools/workspace
447456
448- # Check if CommandBox started any server
449- echo "Checking CommandBox servers..."
450- if command -v box &> /dev/null; then
451- box server list || echo "Could not list servers"
452- else
453- echo "box command not available"
454- fi
455-
456- # Alternative: Use Docker to run Lucee
457- echo -e "\nTrying Docker approach..."
458-
459- # Create a simple test directory
460- mkdir -p docker-test
461- echo '<cfoutput>Hello from Docker Lucee!</cfoutput>' > docker-test/index.cfm
462-
463- # Run Lucee in Docker
464- docker run -d --name lucee-test -p 60008:8888 -v $(pwd)/docker-test:/var/www lucee/lucee:5
465-
466- # Wait for Docker container to start
467- echo "Waiting for Docker Lucee to start..."
457+ # Wait for server
458+ echo "Waiting for server to initialize..."
468459 sleep 15
469460
470- # Test Docker Lucee
471- echo "Testing Docker Lucee on port 60008... "
472- curl -f http://localhost:60008/ || echo "Docker Lucee test failed"
461+ # Check servers
462+ echo "Active servers: "
463+ box server list
473464
474- # Show container logs
475- echo -e "\nDocker container logs:"
476- docker logs lucee-test
465+ # Test the simple server
466+ echo -e "\nTesting server on port 60006..."
467+ cd commandbox-test
468+ curl -f http://localhost:60006/ || {
469+ echo "Server test failed!"
470+ cd ..
471+ box server log
472+ exit 1
473+ }
477474
478- # Cleanup
479- docker stop lucee-test
480- docker rm lucee-test
475+ echo "Server is working!"
481476
482477 - name : Wait for Server and Apply Config
483478 run : |
484- # Simple check if server is running
485- echo "Final server check..."
486-
487- # Try the simple webroot
488- if curl -f -s http://localhost:60006/; then
489- echo "Simple server is working!"
490- else
491- echo "ERROR: Simple server test failed"
492- cd ./tools/workspace
493- box server log
494- exit 1
495- fi
496-
479+ # Server confirmed working, now set up for tests
497480 echo "Server is running on port 60006"
481+ cd ./tools/workspace
482+
483+ # Since we have a working server, let's continue with the test setup
484+ echo "CommandBox server is ready for testing"
498485
499486 # Database drivers are bundled with CommandBox/Lucee/Adobe CF
500487 # H2 driver is downloaded manually for Lucee engines in the setup step
0 commit comments