fix: build workspace packages before migration tests #5

Merged
Zayin_Admin merged 1 commits from phase-3/migration-integration-tests into main 2026-07-21 15:03:21 +00:00
3 changed files with 9 additions and 7 deletions
+7 -5
View File
@@ -25,11 +25,13 @@ Docker and the Docker Compose plugin are required for the live suite:
pnpm test:migrations:integration pnpm test:migrations:integration
``` ```
The command starts the repository's pinned PostgreSQL image in a unique Compose project, waits for The command first builds the workspace through the repository's Turbo build graph, then starts the
bounded health readiness, runs the production PostgreSQL adapter and migration services, and then repository's pinned PostgreSQL image in a unique Compose project, waits for bounded health
removes the container, network, and volume. Each scenario also receives a safely named disposable readiness, runs the production PostgreSQL adapter and migration services, and removes the
database. Direct host runs use a Docker-assigned random port bound only to `127.0.0.1`; a container, network, and volume. A build failure occurs before Docker provisioning. Each scenario
containerized Gitea job joins the isolated Compose network and uses the PostgreSQL service name. also receives a safely named disposable database. Direct host runs use a Docker-assigned random
port bound only to `127.0.0.1`; a containerized Gitea job joins the isolated Compose network and
uses the PostgreSQL service name.
The live suite proves fresh read-only planning, initial and incremental application, genuine The live suite proves fresh read-only planning, initial and incremental application, genuine
no-op behavior, exact applied checksums and history, edited or corrupt history rejection, no-op behavior, exact applied checksums and history, edited or corrupt history rejection,
+1 -1
View File
@@ -27,7 +27,7 @@
"migrations:validate": "turbo run build && node core/dist/cli/validate-migrations.js", "migrations:validate": "turbo run build && node core/dist/cli/validate-migrations.js",
"modules:validate": "turbo run build && node core/dist/cli/validate-modules.js", "modules:validate": "turbo run build && node core/dist/cli/validate-modules.js",
"test": "turbo run test test:root", "test": "turbo run test test:root",
"test:migrations:integration": "bash scripts/test-migrations-integration.sh", "test:migrations:integration": "pnpm build && bash scripts/test-migrations-integration.sh",
"test:root": "vitest run --config vitest.config.ts", "test:root": "vitest run --config vitest.config.ts",
"test:watch": "vitest", "test:watch": "vitest",
"typecheck": "turbo run typecheck typecheck:root", "typecheck": "turbo run typecheck typecheck:root",
+1 -1
View File
@@ -134,7 +134,7 @@ describe("development infrastructure", () => {
); );
expect(packageDocument.scripts?.["test:migrations:integration"]).toBe( expect(packageDocument.scripts?.["test:migrations:integration"]).toBe(
"bash scripts/test-migrations-integration.sh", "pnpm build && bash scripts/test-migrations-integration.sh",
); );
expect(source).toContain('source "$repository_root/scripts/lib/compose-job-network.sh"'); expect(source).toContain('source "$repository_root/scripts/lib/compose-job-network.sh"');
expect(source).toContain('export POSTGRES_PORT="0"'); expect(source).toContain('export POSTGRES_PORT="0"');