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 352d16a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,22 @@ 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
env:
RUSTFLAGS: '-D warnings'
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(" ")')"
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 352d16a

Please sign in to comment.