Skip to content

Commit 19d1269

Browse files
shinigami-777oleonardolima
authored andcommitted
ci: add new check-docs job, justfile recipe and documentation
1 parent 0f89edb commit 19d1269

3 files changed

Lines changed: 24 additions & 1 deletion

File tree

.github/workflows/cont_integration.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,21 @@ jobs:
166166
- name: Build
167167
working-directory: examples/${{ matrix.example-dir }}
168168
run: cargo build
169+
170+
check-docs:
171+
needs: prepare
172+
name: Check documentation errors
173+
runs-on: ubuntu-latest
174+
steps:
175+
- name: Checkout
176+
uses: actions/checkout@v6
177+
with:
178+
persist-credentials: false
179+
- name: Install Rust toolchain
180+
uses: actions-rust-lang/setup-rust-toolchain@v1
181+
with:
182+
toolchain: ${{ needs.prepare.outputs.rust_version }}
183+
override: true
184+
cache: true
185+
- name: Check docs
186+
run: RUSTDOCFLAGS='-D warnings' cargo doc --workspace --no-deps

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Coding Conventions
8787
------------------
8888

8989
This codebase uses spaces, not tabs.
90-
Run `just check` to check formatting, linting, compilation and commit signing, `just fmt` to format code before commiting, and `just test` to run tests for all crates.
90+
Run `just check` to check formatting, linting, compilation and commit signing, `just fmt` to format code before commiting, `just test` to run tests for all crates, `just pre-push` to run the full pre-push suite before pushing changes and `just doc` to check documentation build warnings and errors for all packages.
9191
This is also enforced by the CI.
9292
All public items must be documented. We adhere to the [Rust API Guidelines](https://rust-lang.github.io/api-guidelines/about.html) with respect to documentation.
9393

justfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ alias c := check
33
alias f := fmt
44
alias t := test
55
alias p := pre-push
6+
alias d := doc
67

78
_default:
89
@just --list
@@ -57,3 +58,7 @@ _test-testenv:
5758

5859
# Run pre-push suite: format, check, and test
5960
pre-push: fmt check test
61+
62+
# Check documentation for all workspace packages
63+
doc:
64+
RUSTDOCFLAGS='-D warnings' cargo doc --workspace --no-deps

0 commit comments

Comments
 (0)