forked from alexliesenfeld/httpmock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (56 loc) · 1.51 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
68
.PHONY: setup
setup:
cargo install cargo-audit
cargo install --locked cargo-deny
cargo install cargo-tarpaulin
cargo install cargo-hack
.PHONY: test-full
test-full:
docker compose up -d
HTTPMOCK_TESTS_DISABLE_SIMULATED_STANDALONE_SERVER=1 cargo hack test --feature-powerset --exclude-features https
.PHONY: check
check:
cargo fmt --check
cargo clippy
cargo audit
cargo deny check
.PHONY: coverage
coverage:
cargo tarpaulin --out
.PHONY: coverage-full
coverage-full:
cargo tarpaulin --config tarpaulin.full.toml --out
.PHONY: coverage-debug
coverage-debug:
RUST_BACKTRACE=1 RUST_LOG=trace cargo tarpaulin --out -- --nocapture
.PHONY: clean-coverage
clean-coverage:
rm -f *.profraw
rm -f cobertura.xml
rm -f tarpaulin-report.html
.PHONY: clean-coverage
clean: clean-coverage
cargo clean
.PHONY: certs
certs:
rm -rf certs
mkdir certs
cd certs && openssl genrsa -out ca.key 2048
cd certs && openssl req -x509 -new -nodes -key ca.key -sha256 -days 36525 -out ca.pem -subj "/CN=httpmock"
.PHONY: docker
docker:
docker-compose build --no-cache
docker-compose up
.PHONY: docs
docs:
rm -rf tools/target/generated && mkdir -p tools/target/generated
cd tools && cargo run --bin extract_docs
cd tools && cargo run --bin extract_code
cd tools && cargo run --bin extract_groups
cd tools && cargo run --bin extract_example_tests
rm -rf docs/website/generated && cp -r tools/target/generated docs/website/generated
cd docs/website && npm install && npm run generate-docs
.PHONY: fmt
fmt:
cargo fmt
cargo fix --allow-dirty