chore(test): set up integration test framework with postgres

- Generate Drizzle migrations (databases/migrations/)
- Add databases/schema.kit.ts for drizzle-kit (Node-compatible imports)
- Update drizzle.config.ts to use schema.kit.ts
- Add deno tasks: test:unit, test:integration, migrate
- Add tests/helpers/db_integration.ts: testDb, truncateAll, seed helpers
- Add .gitea/workflows/test.yml: CI with postgres service container
- Update lint.yml: run test:unit only (no DB needed)
- Update deploy.yml: add check-code job, gate deploy on it
This commit is contained in:
2026-04-26 00:23:12 +02:00
committed by djalim
parent 980efcfbc3
commit cdd9c0bf06
7 changed files with 1003 additions and 2 deletions
+4 -1
View File
@@ -10,7 +10,10 @@
"build": "deno run -A --unstable-ffi dev.ts build",
"preview": "deno run -A --unstable-ffi main.ts",
"update": "deno run -A -r https://fresh.deno.dev/update .",
"test": "deno test -A --no-check tests/"
"test": "deno test -A --no-check tests/",
"test:unit": "deno test -A --no-check tests/unit/",
"test:integration": "deno test -A --no-check tests/integration/",
"migrate": "node_modules/.bin/drizzle-kit migrate"
},
"lint": {
"rules": {