Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/ci-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
smoke:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
port: [8080, 8090]
steps:
- uses: actions/checkout@v4

Expand All @@ -36,17 +39,18 @@ jobs:

- name: Start container
run: |
docker run -d --name smoke-test \
-p 18080:8080 \
docker run -d --name smoke-test-${{ matrix.port }} \
-p 18080:${{ matrix.port }} \
-e NODE_ENV=production \
-e PORT=${{ matrix.port }} \
codex-proxy:smoke
echo "Container started"

- name: Wait for healthy
run: |
echo "Waiting for container to become healthy..."
for i in $(seq 1 30); do
STATUS=$(docker inspect --format='{{.State.Health.Status}}' smoke-test 2>/dev/null || echo "starting")
STATUS=$(docker inspect --format='{{.State.Health.Status}}' smoke-test-${{ matrix.port }} 2>/dev/null || echo "starting")
echo " [$i/30] status: $STATUS"
if [ "$STATUS" = "healthy" ]; then
echo "Container is healthy"
Expand All @@ -55,7 +59,7 @@ jobs:
sleep 2
done
echo "::error::Container did not become healthy within 60s"
docker logs smoke-test
docker logs smoke-test-${{ matrix.port }}
exit 1

- name: Verify /health endpoint
Expand All @@ -78,5 +82,5 @@ jobs:
- name: Cleanup
if: always()
run: |
docker logs smoke-test 2>&1 | tail -30
docker rm -f smoke-test || true
docker logs smoke-test-${{ matrix.port }} 2>&1 | tail -30
docker rm -f smoke-test-${{ matrix.port }} || true