-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
67 lines (54 loc) · 1.08 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
##
# This file is part of the pl.wrzasq.commons.
#
# @license http://mit-license.org/ The MIT license
# @copyright 2023 - 2024 © by Rafał Wrzeszcz - Wrzasq.pl.
##
SHELL:=bash
default: build
clean:
cargo clean
find . -name "*.profraw" -exec rm {} \;
rm -rf coverage.lcov
build:
cargo build
test:
CARGO_INCREMENTAL=0 \
RUSTFLAGS="-Cinstrument-coverage" \
LLVM_PROFILE_FILE="cargo-test-%p-%m.profraw" \
cargo test --all-features --lib
test-local:
docker run -d --rm --name dynamodb -p 8000:8000 amazon/dynamodb-local:2.2.1
make test
docker stop dynamodb
check:
cargo fmt --check
cargo clippy
cargo udeps
check-local:
cargo audit
doc:
cargo doc --no-deps
fix:
cargo fmt
lcov:
grcov . \
--binary-path ./target/debug/deps/ \
-s . \
-t lcov \
--branch \
--ignore-not-existing \
--ignore "../*" \
--ignore "/*" \
-o coverage.lcov
coverage:
grcov . \
--binary-path ./target/debug/deps/ \
-s . \
-t html \
--branch \
--ignore-not-existing \
--ignore "../*" \
--ignore "/*" \
-o target/coverage
full: clean build test-local check check-local doc