ci: Enforce sorted dependencies with cargo-sort
This commit is contained in:
parent
0beeb6ef9b
commit
dcff455c19
@ -15,10 +15,10 @@ version = "0.17.0-alpha.4"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
proc-macro-crate = "1.0.0"
|
||||||
proc-macro2 = "1.0.24"
|
proc-macro2 = "1.0.24"
|
||||||
quote = "1.0.8"
|
quote = "1.0.8"
|
||||||
syn = { version = "1.0.57", features = ["full", "extra-traits", "visit"] }
|
syn = { version = "1.0.57", features = ["full", "extra-traits", "visit"] }
|
||||||
proc-macro-crate = "1.0.0"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
@ -36,8 +36,8 @@ futures-core = "0.3.8"
|
|||||||
futures-lite = { version = "1.11.3", optional = true }
|
futures-lite = { version = "1.11.3", optional = true }
|
||||||
http = "0.2.2"
|
http = "0.2.2"
|
||||||
hyper = { version = "0.14.2", optional = true, features = ["client", "http1", "http2", "tcp"] }
|
hyper = { version = "0.14.2", optional = true, features = ["client", "http1", "http2", "tcp"] }
|
||||||
hyper-tls = { version = "0.5.0", optional = true }
|
|
||||||
hyper-rustls-crate = { package = "hyper-rustls", version = "0.22.1", optional = true, default-features = false }
|
hyper-rustls-crate = { package = "hyper-rustls", version = "0.22.1", optional = true, default-features = false }
|
||||||
|
hyper-tls = { version = "0.5.0", optional = true }
|
||||||
isahc-crate = { package = "isahc", version = "1.3.1", optional = true }
|
isahc-crate = { package = "isahc", version = "1.3.1", optional = true }
|
||||||
reqwest = { version = "0.11.3", optional = true, default-features = false }
|
reqwest = { version = "0.11.3", optional = true, default-features = false }
|
||||||
ruma-api = { version = "=0.17.0-alpha.4", path = "../ruma-api" }
|
ruma-api = { version = "=0.17.0-alpha.4", path = "../ruma-api" }
|
||||||
|
@ -21,8 +21,8 @@ tracing = "0.1.25"
|
|||||||
wildmatch = "2.0.0"
|
wildmatch = "2.0.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
matches = "0.1.8"
|
|
||||||
maplit = "1.0.2"
|
maplit = "1.0.2"
|
||||||
|
matches = "0.1.8"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
compat = []
|
compat = []
|
||||||
|
@ -16,10 +16,10 @@ repository = "https://github.com/ruma/ruma"
|
|||||||
version = "0.22.0-alpha.3"
|
version = "0.22.0-alpha.3"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
syn = { version = "1.0.57", features = ["full"] }
|
|
||||||
quote = "1.0.8"
|
|
||||||
proc-macro2 = "1.0.24"
|
|
||||||
proc-macro-crate = "1.0.0"
|
proc-macro-crate = "1.0.0"
|
||||||
|
proc-macro2 = "1.0.24"
|
||||||
|
quote = "1.0.8"
|
||||||
|
syn = { version = "1.0.57", features = ["full"] }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
@ -15,13 +15,13 @@ edition = "2018"
|
|||||||
criterion = { version = "0.3.3", optional = true }
|
criterion = { version = "0.3.3", optional = true }
|
||||||
indoc = "1.0"
|
indoc = "1.0"
|
||||||
js_int = { version = "0.2.0", features = ["serde"] }
|
js_int = { version = "0.2.0", features = ["serde"] }
|
||||||
|
pulldown-cmark = { version = "0.8", default-features = false, optional = true }
|
||||||
ruma-common = { version = "0.5.0", path = "../ruma-common" }
|
ruma-common = { version = "0.5.0", path = "../ruma-common" }
|
||||||
ruma-events-macros = { version = "=0.22.0-alpha.3", path = "../ruma-events-macros" }
|
ruma-events-macros = { version = "=0.22.0-alpha.3", path = "../ruma-events-macros" }
|
||||||
ruma-identifiers = { version = "0.19.0", path = "../ruma-identifiers", features = ["serde"] }
|
ruma-identifiers = { version = "0.19.0", path = "../ruma-identifiers", features = ["serde"] }
|
||||||
ruma-serde = { version = "0.3.1", path = "../ruma-serde" }
|
ruma-serde = { version = "0.3.1", path = "../ruma-serde" }
|
||||||
serde = { version = "1.0.118", features = ["derive"] }
|
serde = { version = "1.0.118", features = ["derive"] }
|
||||||
serde_json = { version = "1.0.60", features = ["raw_value"] }
|
serde_json = { version = "1.0.60", features = ["raw_value"] }
|
||||||
pulldown-cmark = { version = "0.8", default-features = false, optional = true }
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
assign = "1.1.1"
|
assign = "1.1.1"
|
||||||
|
@ -10,8 +10,8 @@ version = "0.19.0"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ruma-identifiers-validation = { version = "0.3.0", path = "../ruma-identifiers-validation", default-features = false }
|
|
||||||
quote = "1.0.8"
|
quote = "1.0.8"
|
||||||
|
ruma-identifiers-validation = { version = "0.3.0", path = "../ruma-identifiers-validation", default-features = false }
|
||||||
syn = "1.0.55"
|
syn = "1.0.55"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
@ -15,8 +15,8 @@ edition = "2018"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
bytes = "1.0.1"
|
bytes = "1.0.1"
|
||||||
form_urlencoded = "1.0.0"
|
form_urlencoded = "1.0.0"
|
||||||
js_int = { version = "0.2.0", features = ["serde"] }
|
|
||||||
itoa = "0.4.6"
|
itoa = "0.4.6"
|
||||||
|
js_int = { version = "0.2.0", features = ["serde"] }
|
||||||
ruma-serde-macros = { version = "=0.3.1", path = "../ruma-serde-macros" }
|
ruma-serde-macros = { version = "=0.3.1", path = "../ruma-serde-macros" }
|
||||||
serde = { version = "1.0.118", features = ["derive"] }
|
serde = { version = "1.0.118", features = ["derive"] }
|
||||||
serde_json = { version = "1.0.61", features = ["raw_value"] }
|
serde_json = { version = "1.0.61", features = ["raw_value"] }
|
||||||
|
@ -18,8 +18,8 @@ unstable-pre-spec = ["ruma-events/unstable-pre-spec"]
|
|||||||
itertools = "0.10.0"
|
itertools = "0.10.0"
|
||||||
js_int = "0.2.0"
|
js_int = "0.2.0"
|
||||||
maplit = "1.0.2"
|
maplit = "1.0.2"
|
||||||
ruma-identifiers = { version = "0.19.0", path = "../ruma-identifiers" }
|
|
||||||
ruma-events = { version = "=0.22.0-alpha.3", path = "../ruma-events" }
|
ruma-events = { version = "=0.22.0-alpha.3", path = "../ruma-events" }
|
||||||
|
ruma-identifiers = { version = "0.19.0", path = "../ruma-identifiers" }
|
||||||
ruma-serde = { version = "0.3.1", path = "../ruma-serde" }
|
ruma-serde = { version = "0.3.1", path = "../ruma-serde" }
|
||||||
ruma-signatures = { version = "0.7.0", path = "../ruma-signatures" }
|
ruma-signatures = { version = "0.7.0", path = "../ruma-signatures" }
|
||||||
serde = { version = "1.0.118", features = ["derive"] }
|
serde = { version = "1.0.118", features = ["derive"] }
|
||||||
|
@ -55,6 +55,15 @@ impl CiTask {
|
|||||||
fn build_nightly(&self) -> xshell::Result<()> {
|
fn build_nightly(&self) -> xshell::Result<()> {
|
||||||
let fmt_res = cmd!("rustup run nightly cargo fmt -- --check").run();
|
let fmt_res = cmd!("rustup run nightly cargo fmt -- --check").run();
|
||||||
let clippy_res = cmd!("rustup run nightly cargo ruma-clippy -D warnings").run();
|
let clippy_res = cmd!("rustup run nightly cargo ruma-clippy -D warnings").run();
|
||||||
fmt_res.and(clippy_res)
|
|
||||||
|
let already_installed = cmd!("rustup run nightly cargo sort -V")
|
||||||
|
.read()
|
||||||
|
.map_or(false, |stdout| !stdout.contains("error"));
|
||||||
|
if !already_installed {
|
||||||
|
cmd!("rustup run nightly cargo install cargo-sort").run()?;
|
||||||
|
}
|
||||||
|
let sort_res = cmd!("cargo sort --workspace --grouped --check").run();
|
||||||
|
|
||||||
|
fmt_res.and(clippy_res).and(sort_res)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user