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
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:
@@ -395,15 +395,25 @@ jobs:
|
||||
ARMATURE_ADMIN_EMAIL: admin@test.local
|
||||
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
|
||||
run: ./ci/wait-for-healthy.sh http://localhost:3000
|
||||
run: ./ci/wait-for-healthy.sh ${{ steps.container-ip.outputs.SERVER_URL }}
|
||||
|
||||
- name: Install Playwright
|
||||
run: npx playwright install --with-deps chromium
|
||||
|
||||
- name: Run surface tests
|
||||
env:
|
||||
SERVER_URL: http://localhost:3000
|
||||
SERVER_URL: ${{ steps.container-ip.outputs.SERVER_URL }}
|
||||
ADMIN_USER: admin
|
||||
ADMIN_PASS: admin
|
||||
run: ./ci/run-surface-tests.sh
|
||||
|
||||
Reference in New Issue
Block a user