feat(lite): switch the archive to zip -9 and download the WebView2 installer on demand #603
Workflow file for this run
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: CI — Docker smoke test | |
| on: | |
| pull_request: | |
| paths: | |
| - "Dockerfile" | |
| - "docker-entrypoint.sh" | |
| - "docker-healthcheck.sh" | |
| - "docker-compose.yml" | |
| - "package*.json" | |
| - "src/**" | |
| - "web/**" | |
| - "shared/**" | |
| - "config/**" | |
| - "scripts/**" | |
| push: | |
| branches: [master] | |
| paths: | |
| - "Dockerfile" | |
| - "docker-entrypoint.sh" | |
| - "docker-healthcheck.sh" | |
| concurrency: | |
| group: ci-docker-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| smoke: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Docker image | |
| run: | | |
| PKG_VER=$(node -p "require('./package.json').version") | |
| docker build -t codex-proxy:smoke --build-arg PROXY_VERSION="$PKG_VER" . | |
| - name: Start container | |
| run: | | |
| docker run -d --name smoke-test \ | |
| -p 18080:8080 \ | |
| -e NODE_ENV=production \ | |
| 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") | |
| echo " [$i/30] status: $STATUS" | |
| if [ "$STATUS" = "healthy" ]; then | |
| echo "Container is healthy" | |
| exit 0 | |
| fi | |
| sleep 2 | |
| done | |
| echo "::error::Container did not become healthy within 60s" | |
| docker logs smoke-test | |
| exit 1 | |
| - name: Verify /health endpoint | |
| run: | | |
| RESPONSE=$(curl -sf http://localhost:18080/health) | |
| echo "Response: $RESPONSE" | |
| echo "$RESPONSE" | jq -e '.status == "ok"' | |
| - name: Verify /v1/models returns valid JSON | |
| run: | | |
| # Without auth, should return 401 or model list — either way must be valid JSON | |
| STATUS=$(curl -s -o /dev/null -w '%{http_code}' http://localhost:18080/v1/models) | |
| echo "/v1/models status: $STATUS" | |
| # 200 (no key set) or 401 (key set) are both acceptable | |
| if [ "$STATUS" != "200" ] && [ "$STATUS" != "401" ]; then | |
| echo "::error::Unexpected status $STATUS from /v1/models" | |
| exit 1 | |
| fi | |
| - name: Verify PROXY_VERSION is injected | |
| run: | | |
| PKG_VER=$(node -p "require('./package.json').version") | |
| CONTAINER_VER=$(docker run --rm codex-proxy:smoke \ | |
| node -e "const m=require('./dist/self-update.js'); process.stdout.write(m.getProxyInfo().version ?? '')") | |
| echo "Expected: $PKG_VER Got: $CONTAINER_VER" | |
| if [ "$CONTAINER_VER" != "$PKG_VER" ]; then | |
| echo "::error::PROXY_VERSION mismatch: expected $PKG_VER, got $CONTAINER_VER" | |
| exit 1 | |
| fi | |
| - name: Cleanup | |
| if: always() | |
| run: | | |
| docker logs smoke-test 2>&1 | tail -30 | |
| docker rm -f smoke-test || true |