Skip to content

Commit

Permalink
enforce missing_docs macro in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
plebhash committed Dec 5, 2024
1 parent f323561 commit ec9eb50
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/rust-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Validate Rust Docs

on:
push:
branches:
- main
pull_request:

jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Find and Document All Crates
run: |
# Fail on any error
set -e
# Find all Cargo.toml files (crates) and run `cargo doc` for each
find . -name "Cargo.toml" | while read -r crate; do
crate_dir=$(dirname "$crate")
echo "Generating documentation for $crate_dir..."
(
cd "$crate_dir" || exit 1
cargo doc --all-features --no-deps
)
done

0 comments on commit ec9eb50

Please sign in to comment.