build(makefile): fix env file loading

This commit is contained in:
Ivan Gabriele
2024-06-07 14:06:40 +02:00
parent 85c3611afb
commit 64034402ca

View File

@@ -53,20 +53,20 @@ release-major:
$(call RELEASE_TEMPLATE,major) $(call RELEASE_TEMPLATE,major)
test: test:
@$(source_env_if_not_ci) @$(source_env_if_not_ci) && \
cargo test --no-fail-fast cargo test --no-fail-fast
test-cover: test-cover:
@$(source_env_if_not_ci) @$(source_env_if_not_ci) && \
cargo llvm-cov cargo llvm-cov
test-doc: test-doc:
@$(source_env_if_not_ci) @$(source_env_if_not_ci) && \
cargo test --doc --no-fail-fast cargo test --doc --no-fail-fast
test-examples: test-examples:
@$(source_env_if_not_ci) @$(source_env_if_not_ci) && \
@for example in $$(ls examples/*.rs | sed 's/examples\/\(.*\)\.rs/\1/'); do \ for example in $$(ls examples/*.rs | sed 's/examples\/\(.*\)\.rs/\1/'); do \
echo "Running $$example"; \ echo "Running $$example"; \
cargo run --example $$example; \ cargo run --example $$example; \
done done
test-watch: test-watch:
@source ./.env @source ./.env && \
cargo watch -x "test -- --nocapture" cargo watch -x "test -- --nocapture"