Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.

Latest commit

 

History

History
37 lines (23 loc) · 828 Bytes

File metadata and controls

37 lines (23 loc) · 828 Bytes

Contributing

Development

Environment

An environment variable with the database url is required for sqlx to connect.

echo DATABASE_URL=postgres://admin:password@localhost:5432/spaced > .env

Testing

Note: the DATABASE_URL must be present in the environment for the database tests.

Running all tests

cargo test

Running tests for a specific workspace member

cargo test -p item_producer

Updating migrations

Note: the DATABASE_URL must be present in the environment for the sqlx-cli.

The docker images during build-time do not have access to a database with migrations applied. To ensure the docker image can be built, the json files under the .sqlx directory must be up-to-date and committed.

cargo sqlx prepare --workspace -- --all-targets --all-features