Add CI job to check API docs

This ensures that `cargo doc` does not generate any warnings.
This commit is contained in:
Eric Huss 2025-04-20 19:43:32 -07:00
parent 46963ebf65
commit 6e143ce2a1

View File

@ -98,6 +98,18 @@ jobs:
- run: rustup component add clippy
- run: cargo clippy --workspace --all-targets --no-deps -- -D warnings
docs:
name: Check API docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: bash ci/install-rust.sh stable x86_64-unknown-linux-gnu
- name: Ensure intradoc links are valid
run: cargo doc --workspace --document-private-items --no-deps
env:
RUSTDOCFLAGS: -D warnings
# The success job is here to consolidate the total success/failure state of
# all other jobs. This job is then included in the GitHub branch protection
# rule which prevents merges unless all other jobs are passing. This makes
@ -112,6 +124,7 @@ jobs:
- aarch64-cross-builds
- gui
- clippy
- docs
runs-on: ubuntu-latest
steps:
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'