Skip to main content

Local database and test setup

How to spin up a local database for running tests against gf-sourcers.

For a video walkthrough, see this Loom.

Build the local database

From the root of gf-sourcers:

source set-env-local.sh
cd dev/docker/goodfitDB
./rebuild-db.sh

This loads the local environment variables and rebuilds the Docker-based local DB from scratch.

Apply new migrations

When new schema migrations land on main, apply them with:

cd dev/schemaMigrations
pnpm migrate up

Run tests

pnpm test