From c99db7d9c648e3d001c964da65b21fe839ba5dbd Mon Sep 17 00:00:00 2001 From: Paul Rastoin <45004772+prastoin@users.noreply.github.com> Date: Fri, 10 Apr 2026 15:53:56 +0200 Subject: [PATCH] Fix server-validation ci pending instance command detection (#19558) https://github.com/twentyhq/twenty/actions/runs/24246052659/job/70792870185 --- .github/workflows/ci-server.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-server.yaml b/.github/workflows/ci-server.yaml index a18755905e..f9267b66ee 100644 --- a/.github/workflows/ci-server.yaml +++ b/.github/workflows/ci-server.yaml @@ -144,15 +144,18 @@ jobs: exit 1 - name: Server / Check for Pending Migrations run: | - CORE_MIGRATION_OUTPUT=$(npx nx database:migrate:generate twenty-server -- --name core-migration-check || true) + npx nx database:migrate:generate twenty-server -- --name pending-migration-check || true - CORE_MIGRATION_FILE=$(ls packages/twenty-server/src/database/typeorm/core/migrations/common/*core-migration-check.ts 2>/dev/null || echo "") - - if [ -n "$CORE_MIGRATION_FILE" ]; then + if ! git diff --quiet; then echo "::error::Unexpected migration files were generated. Please run 'npx nx database:migrate:generate twenty-server -- --name ' and commit the result." - echo "$CORE_MIGRATION_OUTPUT" + echo "" + echo "The following migration changes were detected:" + echo "===================================================" + git diff + echo "===================================================" + echo "" - rm -f packages/twenty-server/src/database/typeorm/core/migrations/common/*core-migration-check.ts + git checkout -- . exit 1 fi