ShadowySpirits commented on code in PR #490:
URL: https://github.com/apache/rocketmq-clients/pull/490#discussion_r1173625830
##########
.github/workflows/rust_build.yml:
##########
@@ -2,27 +2,114 @@ name: Rust Build
on:
workflow_call:
jobs:
+ fmt:
+ runs-on: ubuntu-latest
+ name: fmt
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - name: Install stable
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ components: rustfmt
+ - name: Code format check
+ working-directory: ./rust
+ run: cargo fmt --check
+ clippy:
+ runs-on: ubuntu-latest
+ name: clippy
+ permissions: write-all
+ strategy:
+ fail-fast: false
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - name: Install stable
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ components: clippy
+ - name: Install protoc
+ uses: arduino/setup-protoc@v1
+ with:
+ version: '3.x'
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ - name: Clippy check
+ uses: actions-rs/clippy-check@v1
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ args: --all-features --manifest-path rust/Cargo.toml -- -D warnings
+ doc:
+ runs-on: ubuntu-latest
+ name: doc
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - name: Install stable
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ - name: Install protoc
+ uses: arduino/setup-protoc@v1
+ with:
+ version: '3.x'
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ - name: Build doc
+ working-directory: ./rust
+ run: cargo doc --no-deps --all-features
+ env:
+ RUSTDOCFLAGS: --cfg docsrs
+ msrv:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ msrv: [1.61]
+ name: msrv / ${{ matrix.msrv }}
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - name: Install ${{ matrix.msrv }}
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: ${{ matrix.msrv }}
Review Comment:
I manually specified the version used by `cargo check`
<img width="598" alt="image"
src="https://user-images.githubusercontent.com/32436597/233612863-de4a1d71-2270-440f-a205-c63146612339.png">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]