This is an automated email from the ASF dual-hosted git repository.
aaronai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git
The following commit(s) were added to refs/heads/master by this push:
new 17858b0a Using clippy component of installed Rust toolchain as the
lint tool directly in GitHub Action workflow (#499)
17858b0a is described below
commit 17858b0a069cf30ca9e565992186357cb841357b
Author: Aaron Ai <[email protected]>
AuthorDate: Mon Apr 24 13:54:27 2023 +0800
Using clippy component of installed Rust toolchain as the lint tool
directly in GitHub Action workflow (#499)
---
.github/workflows/rust_build.yml | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/rust_build.yml b/.github/workflows/rust_build.yml
index 404c2104..b7e43500 100644
--- a/.github/workflows/rust_build.yml
+++ b/.github/workflows/rust_build.yml
@@ -18,11 +18,8 @@ jobs:
working-directory: ./rust
run: cargo fmt --check
clippy:
+ name: clippy
runs-on: ubuntu-latest
- name: clippy check
- permissions: write-all
- strategy:
- fail-fast: false
steps:
- uses: actions/checkout@v3
with:
@@ -32,11 +29,10 @@ jobs:
with:
toolchain: stable
components: clippy
- - name: Clippy check
- uses: actions-rs/clippy-check@v1
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- args: --all-features --manifest-path rust/Cargo.toml -- -D warnings
+ # Run clippy
+ - name: clippy check
+ working-directory: ./rust
+ run: cargo clippy --all-features -- -D warnings
doc:
runs-on: ubuntu-latest
name: doc check
@@ -92,11 +88,11 @@ jobs:
- name: Install protoc
uses: arduino/setup-protoc@v1
with:
- version: '3.x'
+ version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build
env:
BUILD_PROTO: true
run: rm src/pb/*.rs && cargo build
- name: Unit Test
- run: cargo test -- --nocapture
\ No newline at end of file
+ run: cargo test -- --nocapture