You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by li...@apache.org on 2022/02/27 12:31:29 UTC
[rocketmq-client-rust] branch master updated: Set up github action
This is an automated email from the ASF dual-hosted git repository.
lizhanhui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-rust.git
The following commit(s) were added to refs/heads/master by this push:
new 6353ae8 Set up github action
new 9bcd406 Merge pull request #1 from lizhanhui/develop
6353ae8 is described below
commit 6353ae806be2ce62742d4e09fcee9dbd8a4d6f39
Author: Li Zhanhui <li...@gmail.com>
AuthorDate: Sun Feb 27 20:28:00 2022 +0800
Set up github action
---
.github/workflows/main.yml | 79 ++++++++++++++++++++++++++++++++++++++++++++++
build.rs | 4 +--
src/lib.rs | 10 ++----
3 files changed, 83 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..1b3c25a
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,79 @@
+# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
+#
+# While our "example" application has the platform-specific code,
+# for simplicity we are compiling and testing everything on the Ubuntu environment only.
+# For multi-OS testing see the `cross.yml` workflow.
+
+on: [push, pull_request]
+
+name: CI
+
+jobs:
+ check:
+ name: Check
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout sources
+ uses: actions/checkout@v2
+
+ - name: Install stable toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ toolchain: stable
+ override: true
+
+ - name: Run cargo check
+ uses: actions-rs/cargo@v1
+ continue-on-error: true # WARNING: only for this example, remove it!
+ with:
+ command: check
+
+ test:
+ name: Test Suite
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout sources
+ uses: actions/checkout@v2
+
+ - name: Install stable toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ toolchain: stable
+ override: true
+
+ - name: Run cargo test
+ uses: actions-rs/cargo@v1
+ continue-on-error: true # WARNING: only for this example, remove it!
+ with:
+ command: test
+
+ lints:
+ name: Lints
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout sources
+ uses: actions/checkout@v2
+
+ - name: Install stable toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ toolchain: stable
+ override: true
+ components: rustfmt, clippy
+
+ - name: Run cargo fmt
+ uses: actions-rs/cargo@v1
+ continue-on-error: true # WARNING: only for this example, remove it!
+ with:
+ command: fmt
+ args: --all -- --check
+
+ - name: Run cargo clippy
+ uses: actions-rs/cargo@v1
+ continue-on-error: true # WARNING: only for this example, remove it!
+ with:
+ command: clippy
+ args: -- -D warnings
\ No newline at end of file
diff --git a/build.rs b/build.rs
index c6c01e8..d210350 100644
--- a/build.rs
+++ b/build.rs
@@ -1,7 +1,5 @@
fn main() {
- let idl_files = &[
- "proto/apache/rocketmq/v1/service.proto",
- ];
+ let idl_files = &["proto/apache/rocketmq/v1/service.proto"];
tonic_build::configure()
.build_client(true)
.build_server(false)
diff --git a/src/lib.rs b/src/lib.rs
index c1f898e..346484c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -13,18 +13,14 @@ pub mod google {
}
pub mod org_apache_rocketmq {
-
+
#[derive(Debug)]
struct RpcClient {}
-
-
}
#[cfg(test)]
pub mod tests {
#[test]
- fn it_works() {
-
- }
-}
\ No newline at end of file
+ fn it_works() {}
+}