- Install docker and docker-compose
- create a
.env
file with aDATABASE_URL=mysql://testuser:testpassword@db/test_rocket
docker-compose build
docker-compose up [--build] [--detach]
- Go on http://localhost:8000
cargo run --bin=seeder
- add a
TEST_DATABASE_URL
in your.env
file - execute the
scripts/setup_test.sh
(This will ensure that the database schema is up to date in your test database) cargo test -- --test-threads=1
(Since the database is truncated at the begining of each test, running the tests in parallel is impossible)
Cargo natively propose a solution for the documentation.
You can use cargo doc --open
to open the generated documentation.