Skip to content

Commit 6e143ce

Browse files
committed
Add CI job to check API docs
This ensures that `cargo doc` does not generate any warnings.
1 parent 46963eb commit 6e143ce

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,18 @@ jobs:
9898
- run: rustup component add clippy
9999
- run: cargo clippy --workspace --all-targets --no-deps -- -D warnings
100100

101+
docs:
102+
name: Check API docs
103+
runs-on: ubuntu-latest
104+
steps:
105+
- uses: actions/checkout@v4
106+
- name: Install Rust
107+
run: bash ci/install-rust.sh stable x86_64-unknown-linux-gnu
108+
- name: Ensure intradoc links are valid
109+
run: cargo doc --workspace --document-private-items --no-deps
110+
env:
111+
RUSTDOCFLAGS: -D warnings
112+
101113
# The success job is here to consolidate the total success/failure state of
102114
# all other jobs. This job is then included in the GitHub branch protection
103115
# rule which prevents merges unless all other jobs are passing. This makes
@@ -112,6 +124,7 @@ jobs:
112124
- aarch64-cross-builds
113125
- gui
114126
- clippy
127+
- docs
115128
runs-on: ubuntu-latest
116129
steps:
117130
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'

0 commit comments

Comments
 (0)