From d87fca0fbe9b273972d0cb7e0ebb961cc6b384a9 Mon Sep 17 00:00:00 2001 From: chenzhongpu Date: Thu, 21 Apr 2022 16:29:53 +0800 Subject: [PATCH] Update Ci: remove actions-rs/cargo@v1 As stated in the document of `actions-rs/cargo@v1`, this action is not required usually, and we can use `cargo` command in run directly instead. For example, replace ```yaml - uses: actions-rs/cargo@v1 with: command: fmt args: --all -- --check ``` with ```yaml - run: cargo fmt --all -- check ``` --- src/test/ci.md | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/test/ci.md b/src/test/ci.md index 738af6fe..ec79c4f6 100644 --- a/src/test/ci.md +++ b/src/test/ci.md @@ -292,9 +292,7 @@ jobs: profile: minimal toolchain: stable override: true - - uses: actions-rs/cargo@v1 - with: - command: check + - run: cargo check test: name: Test Suite @@ -306,9 +304,7 @@ jobs: profile: minimal toolchain: stable override: true - - uses: actions-rs/cargo@v1 - with: - command: test + - run: cargo test fmt: name: Rustfmt @@ -321,10 +317,7 @@ jobs: toolchain: stable override: true - run: rustup component add rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - run: cargo fmt --all -- --check clippy: name: Clippy @@ -337,10 +330,7 @@ jobs: toolchain: stable override: true - run: rustup component add clippy - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: -- -D warnings + - run: cargo clippy -- -D warnings ``` ## 构建