Bläddra i källkod

ci: add workflow for Hermes Rust client

Co-Authored-By: Tejas Badadare <tejas@dourolabs.xyz>
Devin AI 5 månader sedan
förälder
incheckning
d10e5e976e
1 ändrade filer med 41 tillägg och 0 borttagningar
  1. 41 0
      .github/workflows/ci-hermes-client-rust.yml

+ 41 - 0
.github/workflows/ci-hermes-client-rust.yml

@@ -0,0 +1,41 @@
+name: Check Hermes Rust Client
+
+on:
+  pull_request:
+    paths:
+      - .github/workflows/ci-hermes-client-rust.yml
+      - apps/hermes/client/rust/**
+  push:
+    branches: [main]
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    defaults:
+      run:
+        working-directory: apps/hermes/client/rust
+    steps:
+      - uses: actions/checkout@v2
+      - uses: Swatinem/rust-cache@v2
+        with:
+          workspaces: "apps/hermes/client/rust -> target"
+      - uses: actions-rs/toolchain@v1
+        with:
+          profile: minimal
+          toolchain: 1.82.0
+          components: rustfmt, clippy
+          override: true
+      - name: Format check
+        run: cargo fmt --all -- --check
+        if: success() || failure()
+      - name: Clippy check
+        run: cargo clippy --tests -- --deny warnings
+        if: success() || failure()
+      - name: Build check
+        run: cargo build
+        if: success() || failure()
+      - name: Run tests
+        run: cargo test
+        if: success() || failure()
+      - name: Build examples
+        run: cargo build --examples
+        if: success() || failure()