|
| 1 | +build: |
| 2 | + @cargo build |
| 3 | + |
| 4 | +test: |
| 5 | + @echo "====================================================================" |
| 6 | + @echo "Build all features with lock file" |
| 7 | + @echo "====================================================================" |
| 8 | + @RUSTFLAGS="-D warnings" cargo build --locked --all-features |
| 9 | + |
| 10 | + @echo "====================================================================" |
| 11 | + @echo "Testing Connection Type TCP without features" |
| 12 | + @echo "====================================================================" |
| 13 | + @RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test --locked -p redis --no-default-features -- --nocapture --test-threads=1 --skip test_module |
| 14 | + |
| 15 | + @echo "====================================================================" |
| 16 | + @echo "Testing Connection Type TCP with all features and RESP2" |
| 17 | + @echo "====================================================================" |
| 18 | + @RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test --locked -p redis --all-features -- --nocapture --test-threads=1 --skip test_module |
| 19 | + |
| 20 | + @echo "====================================================================" |
| 21 | + @echo "Testing Connection Type TCP with all features and RESP3" |
| 22 | + @echo "====================================================================" |
| 23 | + @REDISRS_SERVER_TYPE=tcp PROTOCOL=RESP3 cargo test -p redis --all-features -- --nocapture --test-threads=1 --skip test_module |
| 24 | + |
| 25 | + @echo "====================================================================" |
| 26 | + @echo "Testing Connection Type TCP with all features and Rustls support" |
| 27 | + @echo "====================================================================" |
| 28 | + @RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp+tls RUST_BACKTRACE=1 cargo test --locked -p redis --all-features -- --nocapture --test-threads=1 --skip test_module |
| 29 | + |
| 30 | + @echo "====================================================================" |
| 31 | + @echo "Testing Connection Type TCP with all features and native-TLS support" |
| 32 | + @echo "====================================================================" |
| 33 | + @RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp+tls RUST_BACKTRACE=1 cargo test --locked -p redis --features=json,tokio-native-tls-comp,connection-manager,cluster-async -- --nocapture --test-threads=1 --skip test_module |
| 34 | + |
| 35 | + @echo "====================================================================" |
| 36 | + @echo "Testing Connection Type UNIX" |
| 37 | + @echo "====================================================================" |
| 38 | + @RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=unix RUST_BACKTRACE=1 cargo test --locked -p redis --test parser --test test_basic --test test_types --all-features -- --test-threads=1 --skip test_module |
| 39 | + |
| 40 | + @echo "====================================================================" |
| 41 | + @echo "Testing Connection Type UNIX SOCKETS" |
| 42 | + @echo "====================================================================" |
| 43 | + @RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=unix RUST_BACKTRACE=1 cargo test --locked -p redis --all-features -- --test-threads=1 --skip test_cluster --skip test_async_cluster --skip test_module --skip test_cluster_scan |
| 44 | + |
| 45 | + @echo "====================================================================" |
| 46 | + @echo "Testing async-std with Rustls" |
| 47 | + @echo "====================================================================" |
| 48 | + @RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test --locked -p redis --features=async-std-rustls-comp,cluster-async -- --nocapture --test-threads=1 --skip test_module |
| 49 | + |
| 50 | + @echo "====================================================================" |
| 51 | + @echo "Testing async-std with native-TLS" |
| 52 | + @echo "====================================================================" |
| 53 | + @RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test --locked -p redis --features=async-std-native-tls-comp,cluster-async -- --nocapture --test-threads=1 --skip test_module |
| 54 | + |
| 55 | + @echo "====================================================================" |
| 56 | + @echo "Testing redis-test" |
| 57 | + @echo "====================================================================" |
| 58 | + @RUSTFLAGS="-D warnings" RUST_BACKTRACE=1 cargo test --locked -p redis-test |
| 59 | + |
| 60 | + |
| 61 | +test-module: |
| 62 | + @echo "====================================================================" |
| 63 | + @echo "Testing RESP2 with module support enabled (currently only RedisJSON)" |
| 64 | + @echo "====================================================================" |
| 65 | + @RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test --locked --all-features test_module -- --test-threads=1 |
| 66 | + |
| 67 | + @echo "====================================================================" |
| 68 | + @echo "Testing RESP3 with module support enabled (currently only RedisJSON)" |
| 69 | + @echo "====================================================================" |
| 70 | + @RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 RESP3=true cargo test --all-features test_module -- --test-threads=1 |
| 71 | + |
| 72 | +test-single: test |
| 73 | + |
| 74 | +bench: |
| 75 | + cargo bench --all-features |
| 76 | + |
| 77 | +docs: |
| 78 | + @RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --no-deps |
| 79 | + |
| 80 | +upload-docs: docs |
| 81 | + @./upload-docs.sh |
| 82 | + |
| 83 | +style-check: |
| 84 | + @rustup component add rustfmt 2> /dev/null |
| 85 | + cargo fmt --all -- --check |
| 86 | + |
| 87 | +lint: |
| 88 | + @rustup component add clippy 2> /dev/null |
| 89 | + cargo clippy --all-features --all --tests --examples -- -D clippy::all -D warnings |
| 90 | + |
| 91 | +fuzz: |
| 92 | + cd afl/parser/ && \ |
| 93 | + cargo afl build --bin fuzz-target && \ |
| 94 | + cargo afl fuzz -i in -o out target/debug/fuzz-target |
| 95 | + |
| 96 | +.PHONY: build test bench docs upload-docs style-check lint fuzz |
0 commit comments