Skip to content

Commit

Permalink
Fix testing without explicit features (#1041)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvdb authored Sep 10, 2024
1 parent 4422cee commit 2d81c9b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# shellcheck disable=SC2086

set -e

Expand All @@ -11,7 +12,9 @@ for crate in $crates; do
echo "Testing crate: $crate..."

# Always test the crate itself first, without any features added.
$CARGO ${CARGO_COMMAND} -p $crate
if [[ "$crate" != "utoipa-gen" ]]; then
$CARGO ${CARGO_COMMAND} -p $crate
fi

if [[ "$crate" == "utoipa" ]]; then
$CARGO ${CARGO_COMMAND} -p utoipa --features openapi_extensions,preserve_order,preserve_path_order,debug,macros
Expand Down
3 changes: 3 additions & 0 deletions utoipa-axum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ tower-service = "0.3"
tower-layer = "0.3.2"
paste = "1.0"

[dev-dependencies]
utoipa = { path = "../utoipa", features = ["debug"] }

[package.metadata.docs.rs]
features = []
rustdoc-args = ["--cfg", "doc_cfg"]
Expand Down
3 changes: 3 additions & 0 deletions utoipa-rapidoc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@ actix-web = { version = "4", optional = true, default-features = false }
rocket = { version = "0.5", features = ["json"], optional = true }
axum = { version = "0.7", default-features = false, features = ["json"], optional = true }

[dev-dependencies]
utoipa-rapidoc = { path = ".", features = ["actix-web", "axum", "rocket"] }

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] }
3 changes: 3 additions & 0 deletions utoipa-redoc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@ actix-web = { version = "4", optional = true }
rocket = { version = "0.5", features = ["json"], optional = true }
axum = { version = "0.7", default-features = false, optional = true }

[dev-dependencies]
utoipa-redoc = { path = ".", features = ["actix-web", "axum", "rocket"] }

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] }
3 changes: 3 additions & 0 deletions utoipa-scalar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@ actix-web = { version = "4", optional = true, default-features = false }
rocket = { version = "0.5", features = ["json"], optional = true }
axum = { version = "0.7", default-features = false, optional = true }

[dev-dependencies]
utoipa-scalar = { path = ".", features = ["actix-web", "axum", "rocket"] }

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] }
1 change: 1 addition & 0 deletions utoipa-swagger-ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ serde_json = { version = "1.0" }

[dev-dependencies]
similar = "2.5"
utoipa-swagger-ui = { path = ".", features = ["actix-web", "axum", "rocket"] }

[package.metadata.docs.rs]
features = ["actix-web", "axum", "rocket", "vendored"]
Expand Down
1 change: 1 addition & 0 deletions utoipa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ indexmap = { version = "2", features = ["serde"] }

[dev-dependencies]
assert-json-diff = "2"
utoipa = { path = ".", features = ["debug"] }

[package.metadata.docs.rs]
features = ["actix_extras", "non_strict_integers", "openapi_extensions", "uuid", "ulid", "url", "yaml", "macros"]
Expand Down

0 comments on commit 2d81c9b

Please sign in to comment.