From 3495b33157aa20ef9bcb4259f1ab846dd39675d0 Mon Sep 17 00:00:00 2001 From: enlineawork Date: Mon, 7 Sep 2026 15:48:40 -0300 Subject: [PATCH] CI: replicar preflight API aislado del deploy VPS --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e2a980..e3f10d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,5 +64,15 @@ jobs: done < <(find scripts -type f -name '*.sh' -print0) - name: Validate Compose run: docker compose --env-file .env.example config >/dev/null + - name: VPS-equivalent isolated API preflight + run: | + set -Eeuo pipefail + image="dhv2-api:ci-vps-preflight-${GITHUB_SHA::12}" + docker build --target builder -t "$image" api-v3 + docker run --rm \ + -v "$PWD/api-v3/test:/app/test:ro" \ + -v "$PWD/api-v3/tsconfig.test.json:/app/tsconfig.test.json:ro" \ + "$image" npm test + docker image rm "$image" >/dev/null 2>&1 || true - name: Build production images run: docker compose --env-file .env.example build api migrate web