From 302fd5ecd7eaf8f6e7f40102ebbb9e4409f3c614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lasse=20M=C3=B8ldrup?= Date: Tue, 26 Sep 2023 14:47:55 +0200 Subject: [PATCH 1/2] Fix doc warnings and add lint --- .github/workflows/build-and-test.yaml | 21 ++++++++++++++++++++- src/v2/mod.rs | 7 +++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 941a2b2b9..4fbc13ba4 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -38,6 +38,26 @@ jobs: run: | cargo fmt -- --color=always --check + "lint_doc": + name: lint:doc + # Don't run on draft pull requests + if: ${{ !github.event.pull_request.draft }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ env.RUST_VERSION }} + override: true + - name: Docs + run: | + RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features --color=always + "lint_clippy": name: lint:clippy # Don't run on draft pull requests @@ -78,4 +98,3 @@ jobs: components: rustfmt - name: Test run: cargo test - diff --git a/src/v2/mod.rs b/src/v2/mod.rs index 7d07bf222..b549c56aa 100644 --- a/src/v2/mod.rs +++ b/src/v2/mod.rs @@ -2337,8 +2337,11 @@ impl Client { }) } - /// For a non-genesis block, this returns the [`QuorumCertificate`], a - /// [`TimeoutCertificate`] (if present) and [`EpochFinalizationEntry`] (if + /// For a non-genesis block, this returns the + /// [`QuorumCertificate`](block_certificates::QuorumCertificate), a + /// [`TimeoutCertificate`](block_certificates::TimeoutCertificate) (if + /// present) + /// and [`EpochFinalizationEntry`](block_certificates::EpochFinalizationEntry) (if /// present). /// If the block being pointed to is *not* from protocol version 6 or /// above, then [`InvalidArgument`](`tonic::Code::InvalidArgument`) From 4d0752fa7b862ea1a50d88dab7f8eac1417932ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lasse=20M=C3=B8ldrup?= Date: Tue, 26 Sep 2023 15:12:21 +0200 Subject: [PATCH 2/2] Install protobuf in Github action --- .github/workflows/build-and-test.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 4fbc13ba4..294080570 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -44,6 +44,8 @@ jobs: if: ${{ !github.event.pull_request.draft }} runs-on: ubuntu-latest steps: + - name: Install protobuf + run: sudo apt-get install -y protobuf-compiler - name: Checkout uses: actions/checkout@v2 with: