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"
|
||||
|
||||
[dependencies]
|
||||
proc-macro-crate = "1.0.0"
|
||||
proc-macro2 = "1.0.24"
|
||||
quote = "1.0.8"
|
||||
syn = { version = "1.0.57", features = ["full", "extra-traits", "visit"] }
|
||||
proc-macro-crate = "1.0.0"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
@ -36,8 +36,8 @@ futures-core = "0.3.8"
|
||||
futures-lite = { version = "1.11.3", optional = true }
|
||||
http = "0.2.2"
|
||||
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-tls = { version = "0.5.0", optional = true }
|
||||
isahc-crate = { package = "isahc", version = "1.3.1", optional = true }
|
||||
reqwest = { version = "0.11.3", optional = true, default-features = false }
|
||||
ruma-api = { version = "=0.17.0-alpha.4", path = "../ruma-api" }
|
||||
|
@ -21,8 +21,8 @@ tracing = "0.1.25"
|
||||
wildmatch = "2.0.0"
|
||||
|
||||
[dev-dependencies]
|
||||
matches = "0.1.8"
|
||||
maplit = "1.0.2"
|
||||
matches = "0.1.8"
|
||||
|
||||
[features]
|
||||
compat = []
|
||||
|
@ -16,10 +16,10 @@ repository = "https://github.com/ruma/ruma"
|
||||
version = "0.22.0-alpha.3"
|
||||
|
||||
[dependencies]
|
||||
syn = { version = "1.0.57", features = ["full"] }
|
||||
quote = "1.0.8"
|
||||
proc-macro2 = "1.0.24"
|
||||
proc-macro-crate = "1.0.0"
|
||||
proc-macro2 = "1.0.24"
|
||||
quote = "1.0.8"
|
||||
syn = { version = "1.0.57", features = ["full"] }
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
@ -15,13 +15,13 @@ edition = "2018"
|
||||
criterion = { version = "0.3.3", optional = true }
|
||||
indoc = "1.0"
|
||||
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-events-macros = { version = "=0.22.0-alpha.3", path = "../ruma-events-macros" }
|
||||
ruma-identifiers = { version = "0.19.0", path = "../ruma-identifiers", features = ["serde"] }
|
||||
ruma-serde = { version = "0.3.1", path = "../ruma-serde" }
|
||||
serde = { version = "1.0.118", features = ["derive"] }
|
||||
serde_json = { version = "1.0.60", features = ["raw_value"] }
|
||||
pulldown-cmark = { version = "0.8", default-features = false, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
assign = "1.1.1"
|
||||
|
@ -10,8 +10,8 @@ version = "0.19.0"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
ruma-identifiers-validation = { version = "0.3.0", path = "../ruma-identifiers-validation", default-features = false }
|
||||
quote = "1.0.8"
|
||||
ruma-identifiers-validation = { version = "0.3.0", path = "../ruma-identifiers-validation", default-features = false }
|
||||
syn = "1.0.55"
|
||||
|
||||
[lib]
|
||||
|
@ -15,8 +15,8 @@ edition = "2018"
|
||||
[dependencies]
|
||||
bytes = "1.0.1"
|
||||
form_urlencoded = "1.0.0"
|
||||
js_int = { version = "0.2.0", features = ["serde"] }
|
||||
itoa = "0.4.6"
|
||||
js_int = { version = "0.2.0", features = ["serde"] }
|
||||
ruma-serde-macros = { version = "=0.3.1", path = "../ruma-serde-macros" }
|
||||
serde = { version = "1.0.118", features = ["derive"] }
|
||||
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"
|
||||
js_int = "0.2.0"
|
||||
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-identifiers = { version = "0.19.0", path = "../ruma-identifiers" }
|
||||
ruma-serde = { version = "0.3.1", path = "../ruma-serde" }
|
||||
ruma-signatures = { version = "0.7.0", path = "../ruma-signatures" }
|
||||
serde = { version = "1.0.118", features = ["derive"] }
|
||||
|
@ -55,6 +55,15 @@ impl CiTask {
|
||||
fn build_nightly(&self) -> xshell::Result<()> {
|
||||
let fmt_res = cmd!("rustup run nightly cargo fmt -- --check").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