Fix CI test-runners health check for DinD networking
Some checks failed
CI/CD / detect-changes (pull_request) Successful in 21s
CI/CD / test-frontend (pull_request) Successful in 5s
CI/CD / test-go-pg (pull_request) Successful in 2m35s
CI/CD / test-sqlite (pull_request) Successful in 3m20s
CI/CD / build-and-deploy (pull_request) Has been cancelled
CI/CD / test-runners (pull_request) Has been cancelled

In Gitea runner pods, docker compose port mapping (3000:80) doesn't
expose to the runner container's localhost. Resolve the armature
container IP via `docker inspect` and pass it directly to the health
check and Playwright test runner.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-02 08:58:29 +00:00
parent 698ea091ed
commit 4a4160300b
2 changed files with 13 additions and 2 deletions

View File

@@ -395,15 +395,25 @@ jobs:
ARMATURE_ADMIN_EMAIL: admin@test.local ARMATURE_ADMIN_EMAIL: admin@test.local
run: docker compose up -d run: docker compose up -d
# In DinD (Gitea runner pods), port-mapped localhost doesn't reach
# the compose container. Resolve the container IP on its Docker
# network so curl / Playwright can connect directly on port 80.
- name: Resolve container IP
id: container-ip
run: |
IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' armature)
echo "SERVER_URL=http://${IP}:80" >> "$GITHUB_OUTPUT"
echo "Resolved container IP → ${IP}"
- name: Wait for healthy - name: Wait for healthy
run: ./ci/wait-for-healthy.sh http://localhost:3000 run: ./ci/wait-for-healthy.sh ${{ steps.container-ip.outputs.SERVER_URL }}
- name: Install Playwright - name: Install Playwright
run: npx playwright install --with-deps chromium run: npx playwright install --with-deps chromium
- name: Run surface tests - name: Run surface tests
env: env:
SERVER_URL: http://localhost:3000 SERVER_URL: ${{ steps.container-ip.outputs.SERVER_URL }}
ADMIN_USER: admin ADMIN_USER: admin
ADMIN_PASS: admin ADMIN_PASS: admin
run: ./ci/run-surface-tests.sh run: ./ci/run-surface-tests.sh

View File

@@ -150,6 +150,7 @@ Design doc: `docs/DESIGN-surface-runners.md`
| Renderer runner | done | `requires: ["mermaid-renderer"]`. 1 suite (contract), 4 tests. | | Renderer runner | done | `requires: ["mermaid-renderer"]`. 1 suite (contract), 4 tests. |
| Runner result API | done | `POST/GET /api/v1/admin/test-runners/results`. In-memory store, 4 Go tests. | | Runner result API | done | `POST/GET /api/v1/admin/test-runners/results`. In-memory store, 4 Go tests. |
| CI integration | done | `test-runners` stage in Gitea CI. Playwright driver, `wait-for-healthy.sh`. | | CI integration | done | `test-runners` stage in Gitea CI. Playwright driver, `wait-for-healthy.sh`. |
| CI DinD networking fix | done | Resolve container IP via `docker inspect` — DinD port mapping doesn't expose to runner localhost. |
### v0.7.3 — Extension Shell Migration + Headless E2E ### v0.7.3 — Extension Shell Migration + Headless E2E