This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch branch-1.11
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/branch-1.11 by this push:
     new ce83da915 AVRO-3868: [Rust][CI] Check consistency between the doc 
comment in lib.rs and README.md (#2510)
ce83da915 is described below

commit ce83da915ca374189850f5d985d85ce1e670def7
Author: Kousuke Saruta <[email protected]>
AuthorDate: Fri Sep 22 17:50:16 2023 +0900

    AVRO-3868: [Rust][CI] Check consistency between the doc comment in lib.rs 
and README.md (#2510)
    
    * Cache cargo-rdme
    
    * Unuse cargo-install
    
    * Trigger GA to check effect of cache
    
    (cherry picked from commit 76c2ca631f81bcdaef85f516ca9baf24bca4b84a)
---
 .github/workflows/test-lang-rust-ci.yml | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/.github/workflows/test-lang-rust-ci.yml 
b/.github/workflows/test-lang-rust-ci.yml
index 494f80c8e..fb13754d1 100644
--- a/.github/workflows/test-lang-rust-ci.yml
+++ b/.github/workflows/test-lang-rust-ci.yml
@@ -80,6 +80,22 @@ jobs:
           components: rustfmt
           targets: ${{ matrix.target }}
 
+      - name: Cache cargo-rdme
+        if: matrix.rust == 'stable' && matrix.target == 
'x86_64-unknown-linux-gnu'
+        uses: actions/cache@v3
+        with:
+          path: ~/.cargo-${{ matrix.rust }}/cargo-rdme
+          key: cargo-rdme-
+
+      # Check if the doc cumment in avro/src/lib.rs and avro/README.md are in 
sync.
+      - name: Run cargo-rdme
+        # The result is environment independent so one test pattern is enough.
+        if: matrix.rust == 'stable' && matrix.target == 
'x86_64-unknown-linux-gnu'
+        run: |
+          cargo install --root ~/.cargo-${{ matrix.rust }}/cargo-rdme --locked 
cargo-rdme
+          export PATH=$PATH:~/.cargo-${{ matrix.rust }}/cargo-rdme/bin
+          cargo rdme --check
+
       - name: Rust Format
         if: matrix.target != 'wasm32-unknown-unknown'
         run: cargo fmt --all -- --check

Reply via email to