chore(test): set up integration test framework with postgres #136
Reference in New Issue
Block a user
Delete Branch "PMPR-setup-test-framework"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR sets up the complete testing infrastructure for the project, enabling
both unit and integration tests.
Changes
Database
databases/schema.kit.ts— Node-compatible schema for drizzle-kitdatabases/migrations/0000_square_jetstream.sqlcovering all 13 tables
Test helpers
tests/helpers/db_integration.ts— test DB connection,truncateAll()for clean state between tests, and seed helpers for each table
CI
.gitea/workflows/test.yml— dedicated test workflow with a postgresservice container (unit + integration jobs)
lint.yml— runtest:unitinstead of the full test suite (no DBneeded for lint CI)
Tasks
deno task test:unit— run unit tests onlydeno task test:integration— run integration tests onlydeno task migrate— apply Drizzle migrationsFixes
@0.45.2version to unversionednpm:drizzle-ormimports (lint ruleno-unversioned-import)NOT_FOUNDinenseignements.tswith_How to run locally