ci: Speed up DB integration tests via Postgres template DB + persistent Jest workers (#31778)

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Declan Carroll
2026-06-05 06:27:41 +00:00
committed by GitHub
co-authored by Claude Opus 4.7
parent be01de6143
commit a83ea70bbc
7 changed files with 161 additions and 17 deletions
+7
View File
@@ -120,7 +120,14 @@ jobs:
packages/cli/test/integration/**
packages/cli/test/migration/**
packages/cli/test/shared/db/**
packages/cli/test/setup-testcontainers.js
packages/cli/test/teardown-testcontainers.js
packages/cli/jest.config.integration.js
packages/cli/jest.config.integration.testcontainers.js
packages/cli/jest.config.migration.js
packages/cli/jest.config.migration.testcontainers.js
packages/@n8n/db/**
packages/@n8n/backend-test-utils/**
packages/cli/**/__tests__/**
packages/testing/containers/services/postgres.ts
.github/workflows/test-db-reusable.yml
+5 -1
View File
@@ -26,7 +26,11 @@ jobs:
migration-cmd: pnpm test:sqlite:migrations
collectCoverage: 'false'
- name: Postgres 16
runner: blacksmith-8vcpu-ubuntu-2204
# 4vcpu is enough since persistent-worker + template-DB make PG16
# complete in ~480s, which is now close to the SQLite leg (~360s)
# — the matrix wall is bounded by the slower leg, so the larger
# 8vcpu runner buys headroom we can't cash in anywhere.
runner: blacksmith-4vcpu-ubuntu-2204
test-cmd: pnpm test:postgres:integration:tc
migration-cmd: pnpm test:postgres:migrations:tc
TEST_IMAGE_POSTGRES: 'postgres:16'