forked from fermyon/spin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (38 loc) · 1.43 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
LOG_LEVEL ?= spin=trace
CERT_NAME ?= local
SPIN_DOC_NAME ?= new-doc.md
.PHONY: build
build:
cargo build --release
.PHONY: test
test: lint test-unit test-integration
.PHONY: lint
lint:
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt --all -- --check
.PHONY: check-rust-examples
check-rust-examples:
for manifest_path in examples/*/Cargo.toml; do \
cargo clippy --manifest-path "$${manifest_path}" -- -D warnings || exit 1 ; \
done
.PHONY: test-unit
test-unit:
RUST_LOG=$(LOG_LEVEL) cargo test --all --no-fail-fast -- --skip integration_tests --nocapture
.PHONY: test-integration
test-integration:
RUST_LOG=$(LOG_LEVEL) cargo test --test integration --no-fail-fast -- --nocapture
.PHONY: test-e2e
test-e2e:
RUST_LOG=$(LOG_LEVEL) cargo test --test integration --features e2e-tests --no-fail-fast -- integration_tests::test_dependencies --nocapture
RUST_LOG=$(LOG_LEVEL) cargo test --test integration --features e2e-tests --no-fail-fast -- --skip integration_tests::test_dependencies --nocapture
.PHONY: test-outbound-redis
test-outbound-redis:
RUST_LOG=$(LOG_LEVEL) cargo test --test integration --features outbound-redis-tests --no-fail-fast -- --nocapture
.PHONY: test-sdk-go
test-sdk-go:
$(MAKE) -C sdk/go test
# simple convenience for developing with TLS
.PHONY: tls
tls: ${CERT_NAME}.crt.pem
$(CERT_NAME).crt.pem:
openssl req -newkey rsa:2048 -nodes -keyout $(CERT_NAME).key.pem -x509 -days 365 -out $(CERT_NAME).crt.pem