feat: run smoke checks after deploy
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-09 21:21:22 -04:00
parent 75b956e7b5
commit 82ca54ddc3
5 changed files with 19 additions and 6 deletions
+9 -2
View File
@@ -1,7 +1,6 @@
#!/bin/sh
set -eu
api_url=${API_HEALTH_URL:-http://localhost:3000/health}
web_url=${WEB_BASE_URL:-http://localhost:8080}
search_url=${PUBLIC_SEARCH_URL:-$web_url/api/v1/public/search?query=}
@@ -15,6 +14,14 @@ check_url() {
printf '%s\n' "${label} check passed"
}
check_url "$api_url" 'API'
if [ -n "${API_HEALTH_URL:-}" ]; then
check_url "$API_HEALTH_URL" 'API'
else
if ! docker compose -f compose.production.yaml exec -T api node -e "fetch('http://127.0.0.1:3000/health').then((response) => process.exit(response.ok ? 0 : 1)).catch(() => process.exit(1))"; then
printf '%s\n' 'API health check failed inside the Compose API service.' >&2
exit 1
fi
printf '%s\n' 'API check passed'
fi
check_url "$web_url/health" 'Web'
check_url "$search_url" 'Public search'