From 1c6dab3c86c2f013962dc00f21c708527d61d121 Mon Sep 17 00:00:00 2001 From: Son NK Date: Tue, 9 Apr 2024 13:36:24 +0200 Subject: [PATCH] add tips to run tests using a local DB (without docker) --- CONTRIBUTING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b6b1019f..e88d2a1a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,6 +68,12 @@ For most tests, you will need to have ``redis`` installed and started on your ma sh scripts/run-test.sh ``` +You can also run tests using a local Postgres DB to speed things up. This can be done by + +- creating an empty test DB and running the database migration by `dropdb test && createdb test && DB_URI=postgresql://localhost:5432/test alembic upgrade head` + +- replacing the `DB_URI` in `test.env` file by `DB_URI=postgresql://localhost:5432/test` + ## Run the code locally Install npm packages