test(ci): gate deployments on MariaDB and Redis integration checks
CI / check (push) Failing after 27s
CI / deploy (push) Skipped
CI / publish-container (push) Skipped

This commit is contained in:
Simo committed 2026-09-13 17:47:58 +02:00
1 parent 966a925614
commit 422be3ce2d
8 files changed
+1312 -4

No files matched your search

+3
View File
@@ -58,6 +58,9 @@ jobs:
time pnpm test:coverage --maxWorkers=4 time pnpm test:coverage --maxWorkers=4
fi fi
- name: MariaDB and Redis integration tests
run: pnpm test:integration
# Compare against reviewed Linux references; updates are explicit. # Compare against reviewed Linux references; updates are explicit.
- name: Install UI test browser - name: Install UI test browser
run: pnpm exec playwright install chromium run: pnpm exec playwright install chromium
+9
View File
@@ -0,0 +1,9 @@
# Real database integration tests
Run `pnpm test:integration` on a Docker-capable host. Missing Docker or failed container setup fails the suite. CI runs this check before deployment.
Six tests exercise real MariaDB catalog transactions and Redis caching: migration CLI replay/status, committed bulk edits and undo history, complete rollback when the second audit insert fails, competing previews, cache expiry metadata and cross-key invalidation isolation.
Each execution starts disposable MariaDB11.4.5 and Redis7.4.2 containers with random exposed ports and generated passwords. No production URLs, volumes or credentials are used. The real migration CLI is copied beneath a temporary isolated fixture root so its environment loader cannot read the checkout environment file. Cleanup attempts all connections and containers even if a previous cleanup fails.
The emulator fixture contains minimal catalog and audit tables. Migrations0027-0029 are exercised; this is not certification of every historical emulator schema or migration. Operation/outbox tests are introduced with their implementation in the following increment.
File diff suppressed because it is too large. Load diff
+3 -1
View File
@@ -39,7 +39,8 @@
"test:e2e": "playwright test", "test:e2e": "playwright test",
"test:ui": "playwright test --config playwright.ui.config.ts", "test:ui": "playwright test --config playwright.ui.config.ts",
"test:ui:update": "playwright test --config playwright.ui.config.ts --update-snapshots", "test:ui:update": "playwright test --config playwright.ui.config.ts --update-snapshots",
"performance:report": "node scripts/performance-report.mjs" "performance:report": "node scripts/performance-report.mjs",
"test:integration": "vitest run --config vitest.integration.config.ts"
}, },
"dependencies": { "dependencies": {
"@base-ui/react": "1.8.0", "@base-ui/react": "1.8.0",
@@ -100,6 +101,7 @@
"pino-pretty": "13.1.3", "pino-pretty": "13.1.3",
"postcss": "8.5.28", "postcss": "8.5.28",
"tailwindcss": "4.3.3", "tailwindcss": "4.3.3",
"testcontainers": "12.1.0",
"tsx": "4.23.13", "tsx": "4.23.13",
"typescript": "7.0.2", "typescript": "7.0.2",
"vite": "8.3.0", "vite": "8.3.0",
+957 -2
View File
File diff suppressed because it is too large. Load diff
+3
View File
@@ -4,6 +4,9 @@ allowBuilds:
"@parcel/watcher": true "@parcel/watcher": true
"@swc/core": true "@swc/core": true
msw: false msw: false
cpu-features: false
protobufjs: false
ssh2: false
minimumReleaseAge: 60 minimumReleaseAge: 60
+7 -1
View File
@@ -25,7 +25,13 @@ export default defineConfig({
DATABASE_URL: "mysql://root:root@localhost:3306/test", DATABASE_URL: "mysql://root:root@localhost:3306/test",
}, },
testTimeout: 10000, testTimeout: 10000,
exclude: ["e2e/**", "node_modules/**", ".next/**", ".next.prev/**"], exclude: [
"integration/**",
"e2e/**",
"node_modules/**",
".next/**",
".next.prev/**",
],
coverage: { coverage: {
enabled: true, enabled: true,
provider: "v8", provider: "v8",
+22
View File
@@ -0,0 +1,22 @@
import { fileURLToPath } from "node:url";
import { defineConfig } from "vitest/config";
export default defineConfig({
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
"server-only": fileURLToPath(
new URL("./src/test/server-only-stub.ts", import.meta.url),
),
},
},
test: {
environment: "node",
include: ["integration/**/*.test.ts"],
fileParallelism: false,
maxWorkers: 1,
hookTimeout: 180_000,
testTimeout: 60_000,
coverage: { enabled: false },
},
});