This repository has been archived on 2026-04-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
core/docker-compose.ci.yml
Jeffrey Smith d499ba9e38
Some checks failed
CI/CD / detect-changes (pull_request) Successful in 4s
CI/CD / test-frontend (pull_request) Successful in 5s
CI/CD / test-go-pg (pull_request) Successful in 2m44s
CI/CD / test-sqlite (pull_request) Successful in 2m55s
CI/CD / test-runners (pull_request) Failing after 1m43s
CI/CD / build-and-deploy (pull_request) Has been skipped
Fix CI healthcheck endpoint and bundled install FK violations
Two bugs preventing the test-runners CI job from passing:

1. Health check used GET /api/v1/auth/login — a POST-only route that
   always returns 404. Changed to GET /api/v1/health which exists.

2. Bundled package install passed empty strings to FK-constrained
   columns (global_settings.updated_by, workflows.created_by),
   causing FOREIGN KEY constraint failures on every surface and
   workflow package. Fixed by resolving the bootstrap admin user ID
   at startup and threading it through the install path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 09:41:23 +00:00

45 lines
1.3 KiB
YAML

# docker-compose.ci.yml — CI test override
#
# Extends base docker-compose.yml. Adds a healthcheck to armature and a
# Playwright test-runner service. All containers share the default compose
# bridge network, so the test-runner reaches armature via Docker DNS
# (http://armature:80).
#
# Usage:
# docker compose -f docker-compose.yml -f docker-compose.ci.yml up --build \
# --abort-on-container-exit --exit-code-from test-runner
#
# The workflow exits with the test-runner's exit code (0 = pass, 1 = fail).
#
# NOTE: Do NOT use network_mode: host — the workflow container and compose
# containers are in separate network namespaces inside DinD. Use the default
# bridge network and let services talk via Docker DNS instead.
services:
armature:
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:80/api/v1/health"]
interval: 2s
timeout: 3s
retries: 30
start_period: 5s
test-runner:
image: mcr.microsoft.com/playwright:v1.52.0-noble
depends_on:
armature:
condition: service_healthy
working_dir: /work
volumes:
- .:/work
environment:
SERVER_URL: http://armature:80
ADMIN_USER: admin
ADMIN_PASS: admin
command:
- bash
- -c
- |
npm install --no-save playwright 2>/dev/null
./ci/run-surface-tests.sh