Merge branch 'postgres' into 'main'
Test Postgres in the CI See merge request soapbox-pub/ditto!324
This commit is contained in:
commit
11474c5cbd
|
@ -28,4 +28,14 @@ test:
|
|||
paths:
|
||||
- deno-test.xml
|
||||
reports:
|
||||
junit: deno-test.xml
|
||||
junit: deno-test.xml
|
||||
|
||||
postgres:
|
||||
stage: test
|
||||
script: deno task db:migrate
|
||||
services:
|
||||
- postgres:16
|
||||
variables:
|
||||
DITTO_NSEC: nsec1zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygs4rm7hz
|
||||
DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
|
@ -5,6 +5,7 @@
|
|||
"start": "deno run -A src/server.ts",
|
||||
"dev": "deno run -A --watch src/server.ts",
|
||||
"hook": "deno run --allow-read --allow-run --allow-write https://deno.land/x/deno_hooks@0.1.1/mod.ts",
|
||||
"db:migrate": "deno run -A scripts/db-migrate.ts",
|
||||
"debug": "deno run -A --inspect src/server.ts",
|
||||
"test": "DATABASE_URL=\"sqlite://:memory:\" deno test -A --junit-path=./deno-test.xml",
|
||||
"check": "deno check src/server.ts",
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
import { DittoDB } from '@/db/DittoDB.ts';
|
||||
|
||||
const kysely = await DittoDB.getInstance();
|
||||
await kysely.destroy();
|
||||
|
||||
Deno.exit();
|
Loading…
Reference in New Issue