Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(ci): serialize the postgres spec step

Yudhi Armyndharis7690358bf36a
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1e2a7b779..53f0d6fa6 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -231,7 +231,10 @@ jobs:
# one database). Both specs self-skip unless DATABASE_TYPE=postgres, so they are a no-op
# in the default test job and only execute here against the postgres:16 service.
- name: Postgres specs (FTS provider + boot-migration lock)
- run: npx jest src/database/migrations/__tests__/1782400000000-AddMessagesFts.pg.spec.ts src/database/migrations/__tests__/pg-boot-migrations.pg.spec.ts
+ # --runInBand: both specs issue DDL against the one shared service database, and jest's
+ # default file-parallelism races their catalog writes (pg_type duplicate-key). The lock
+ # spec's own two-migrator race is in-file (Promise.all) and unaffected by runInBand.
+ run: npx jest --runInBand src/database/migrations/__tests__/1782400000000-AddMessagesFts.pg.spec.ts src/database/migrations/__tests__/pg-boot-migrations.pg.spec.ts
env:
DATABASE_TYPE: postgres
DATABASE_HOST: localhost