From 76c2ca631f81bcdaef85f516ca9baf24bca4b84a Mon Sep 17 00:00:00 2001 From: Kousuke Saruta Date: Fri, 22 Sep 2023 17:50:16 +0900 Subject: [PATCH] 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 --- .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 9166a62049e..5993cd59025 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