Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1.04 KB

CONTRIBUTING.md

File metadata and controls

32 lines (20 loc) · 1.04 KB

Contributing

Development

Testing

Note: The DATABASE_URL must be present as environment variable for the database tests. The DATABASE_URL is automatically set using the build.rs file if the build is not a release build.

Running all tests

cargo test

Running tests for a specific workspace member

cargo test -p item_producer

Updating migrations

Note: npm run sqlx:prepare runs the srcs/scripts/sqlx_prepare.sh script, which by default runs cargo sqlx prepare on all crates individually. Available options are all, item_producer, user_service, and tauri.

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

The following script automatically sets-up each database and applies migrations using the build.rs config defined within each crate and then prepares the .sqlx cache directory.

docker compose up -d
npm run sqlx:prepare