Load the test schema once and truncate data between files.
Deploy Development / deploy (push) Successful in 56s
Test Suite / pytest-backend (push) Successful in 2m43s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-build (push) Successful in 15s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-09-07 15:07:33 +02:00
1 parent 3c0213ae74
commit 79e4fd0d4b
8 files changed
+78 -25

No files matched your search

+11
View File
@@ -36,6 +36,13 @@ SQLITE_HISTORY_MIGRATIONS = (
"021_voice_legacy_immutable",
)
_LEADING_DIGITS = re.compile(r"^(\d{3})_.*\.sql$")
_schema_ready = False
def mark_schema_dirty() -> None:
"""Call after DROP SCHEMA so the next init_db reloads schema.sql."""
global _schema_ready
_schema_ready = False
def _connect_raw():
@@ -137,13 +144,17 @@ def apply_schema_and_migrations() -> None:
def ensure_postgres_ready() -> None:
global _schema_ready
if not use_postgres():
return
if _schema_ready:
return
wait_for_postgres()
try:
apply_schema_and_migrations()
except Exception:
sys.exit(1)
_schema_ready = True
def main() -> None: