ci: Don't auto-install cargo-sort in xtask
This commit is contained in:
parent
9e9696f091
commit
3878476317
4
.github/workflows/nightly.yml
vendored
4
.github/workflows/nightly.yml
vendored
@ -20,6 +20,10 @@ jobs:
|
||||
toolchain: nightly
|
||||
override: true
|
||||
components: rustfmt, clippy
|
||||
- name: Install cargo-sort
|
||||
uses: actions-rs/install@v0.1
|
||||
with:
|
||||
crate: cargo-sort
|
||||
- name: Run checks
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
|
@ -55,13 +55,6 @@ 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();
|
||||
|
||||
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