-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
52 lines (36 loc) · 1.41 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
build:
@cargo build --release
build-static:
@cross build --features jemalloc --target=x86_64-unknown-linux-musl --release
dev:
@cargo build
# make test TEST_FILTER=init:: will run only tests with "init::" in their description
test:
@cargo nextest run $(TEST_FILTER)
@cargo test --doc $(TEST_FILTER)
# make test-integration TEST_FILTER=init:: will run only tests with "init::" in their description
test-integration:
@RUN_INTEGRATION_TESTS=1 cargo nextest run $(TEST_FILTER)
@RUN_INTEGRATION_TESTS=1 cargo test --doc $(TEST_FILTER)
test-static:
@cross nextest run --features jemalloc --target=x86_64-unknown-linux-musl $(TEST_FILTER)
@cross test --features jemalloc --target=x86_64-unknown-linux-musl --doc $(TEST_FILTER)
review-snapshots:
@cargo insta test --test-runner nextest --review
delete-unused-snapshots:
@cargo insta test --test-runner nextest --unreferenced=delete
generate-dist:
@cargo dist generate-ci github
run:
@cargo run -- run
migration-status:
@cargo sqlx migrate info --source db/migrations
migrate-up:
@cargo sqlx migrate run --source db/migrations
migrate-down:
@cargo sqlx migrate revert --source db/migrations
clippy:
@cargo clippy --all-targets --all-features -- -D warnings
doc:
@cargo doc --open --no-deps
.PHONY: test test-integration test-static run build build-static dev delete-unused-snapshots review-snapshots generate-dist migration-status migrate-up migrate-down doc clippy