Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

ci(server): check the generated Kysely types and the SQL dialect baseline

Mauriceccf8c4309a91
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index ea659c4a4..e875e6f1b 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -238,6 +238,11 @@ jobs:
- name: Entity files match the generator
run: cd server && npm run check:entities
+ - name: Kysely table types match the migrated schema
+ # src/db/kysely/ is generated from the migrations by gen:db-types; a
+ # migration that changes a column regenerates it in the same change.
+ run: cd server && npm run check:db-types
+
- name: Lint
# Type-aware rules build the src + tests program, which outgrows
# Node's default ~4 GB heap on the runner.
@@ -260,6 +265,12 @@ jobs:
# scripts/import-boundaries-baseline.json and may only shrink.
run: cd server && npm run lint:boundaries
+ - name: SQLite-only SQL spellings may only shrink
+ # INSERT OR IGNORE, datetime(), json_extract, insertId and friends
+ # outside src/db/dialect/ are held to scripts/dialect-baseline.json,
+ # so the code stays portable to a second engine.
+ run: cd server && npm run lint:dialect
+
- name: Writes outside a transaction
# A method that writes twice does it inside one uow.transactional.
# Today's exceptions sit in scripts/tx-writes-baseline.json and may