fix: use working CommandBox approach from minimal test #2
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: Test CommandBox | |
| on: | |
| push: | |
| branches: | |
| - feat/docker-local-testing | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "temurin" | |
| java-version: "11" | |
| - name: Setup CommandBox | |
| uses: Ortus-Solutions/setup-commandbox@v2.0.1 | |
| with: | |
| version: "6.2.1" | |
| - name: Test CommandBox | |
| run: | | |
| echo "=== Environment ===" | |
| java -version | |
| echo "PATH: $PATH" | |
| echo -e "\n=== CommandBox Test ===" | |
| which box || echo "box not found" | |
| box version || echo "box version failed" | |
| echo -e "\n=== Simple Server Test ===" | |
| mkdir test | |
| cd test | |
| echo '<cfoutput>Hello World!</cfoutput>' > index.cfm | |
| # Start server with explicit timeout | |
| timeout 60s box server start port=8080 --console || { | |
| echo "Server start failed or timed out" | |
| box server list | |
| } | |
| # Test the server | |
| sleep 10 | |
| curl -f http://localhost:8080/ || echo "Server test failed" | |
| # Stop server | |
| box server stop |