cargo install cargo-tarpaulin
cargo tarpaulin --ignore-tests
cargo clippy
cargo clippy -- -D warnings
cargo fmt
cargo fmt -- --check
cargo install cargo-audit
cargo audit
This project uses github actions for CI
- Jobs run automatically on push and PRs
- Must give
GITHUB_TOKEN
read and write permissions
Install
cargo install cargo-expand
- Needs to use the nightly build
rustup toolchain install nightly --allow-downgrade
Run
cargo +nightly expand
Install
cargo install cargo-udeps
Run
cargo +nightly udeps
cargo install bunyan
cargo run | bunyan
Set env variable
export DATABASE_URL=postgres://postgres:[email protected]:5432/newsletter
Create DB in Docker
./scripts/init_db.sh
Add Table
sqlx migrate add table_name
Run migrations
sqlx migrate run
cargo test // logs are hidden
RUST_LOG=true cargo test | bunyan