backie/Makefile

26 lines
559 B
Makefile
Raw Permalink Normal View History

2023-03-09 15:59:45 +00:00
PHONY: db, clippy, diesel, stop, tests, ignored, doc
DATABASE_URL := postgres://postgres:password@localhost/backie
db:
2023-03-09 15:59:45 +00:00
docker run --rm -d --name backie-db -p 5432:5432 \
-e POSTGRES_DB=backie \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=password \
postgres:latest
clippy:
2023-03-09 15:59:45 +00:00
cargo clippy --tests -- -D clippy::all
diesel:
2023-03-09 15:59:45 +00:00
DATABASE_URL=$(DATABASE_URL) diesel migration run
stop:
2023-03-09 15:59:45 +00:00
docker kill backie-db
2023-03-09 15:59:45 +00:00
tests:
DATABASE_URL=$(DATABASE_URL) cargo test --all-features -- --color always --nocapture --test-threads 1
doc:
cargo doc --open