Skip to content

Commit

Permalink
run cargo doc check on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Nov 29, 2023
1 parent 8b092dc commit 39075bb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,20 @@ jobs:
- run: cargo clippy --examples --tests --no-default-features --features tuirs-no-backend -- -D warnings
- run: cargo clippy --examples --tests --no-default-features --features tuirs-no-backend,search -- -D warnings
- run: cargo rustdoc --features=search,termwiz,termion -p tui-textarea -- -D warnings
cargo-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Run `cargo doc` with same configuration as docs.rs
run: |
set -e
md="$(cargo metadata --format-version=1 | jq '.packages[] | select(.name=="tui-textarea") | .metadata.docs.rs')"
export RUSTDOCFLAGS="$(echo "$md" | jq -r '.["rustdoc-args"] | join(" ")') -D warnings"
features="$(echo "$md" | jq -r '.features | join(",")')"
set -x
for target in $(echo "$md" | jq -r '.targets | join(" ")')
do
rustup target add "$target"
cargo doc -p tui-textarea "--features=$features" "--target=$target"
done

0 comments on commit 39075bb

Please sign in to comment.