Skip to content

Latest commit

 

History

History
62 lines (39 loc) · 1.36 KB

CONTRIBUTING.md

File metadata and controls

62 lines (39 loc) · 1.36 KB

Contributing

Development

Testing

Rust

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

Vitest

Running unit/component tests

npm test

Playwright

Running End-to-End tests locally

npm run e2e

The following command is recommended when writing End-to-End tests.

npm run e2e -- --ui

To use Playwright codegen run the following command.

npm run codegen

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