Skip to content

Commit c1d8564

Browse files
committed
feat(ci): add Rust Docs job and update check recipe
1 parent 9305e41 commit c1d8564

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/cont_integration.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,26 @@ jobs:
117117
with:
118118
token: ${{ secrets.GITHUB_TOKEN }}
119119
args: --all-features --all-targets -- -D warnings
120+
121+
docs:
122+
name: Rust Docs
123+
runs-on: ubuntu-latest
124+
steps:
125+
- name: Checkout
126+
uses: actions/checkout@v4
127+
- name: Install Rust Toolchain
128+
uses: dtolnay/rust-toolchain@v1
129+
with:
130+
toolchain: stable
131+
- name: Rust Cache
132+
uses: actions/cache@v3
133+
with:
134+
path: |
135+
~/.cargo/registry
136+
~/.cargo/git
137+
target
138+
key: ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
139+
- name: Build documentation
140+
run: cargo doc --all-features --no-deps
141+
env:
142+
RUSTDOCFLAGS: -D warnings

justfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ _default:
1111
build:
1212
cargo build
1313

14-
# Check code: formatting, compilation, linting, and commit signature
14+
# Check code: formatting, compilation, linting, doc comments, and commit signature
1515
check:
1616
cargo +nightly fmt --all -- --check
1717
cargo check --all-features --all-targets
1818
cargo clippy --all-features --all-targets -- -D warnings
19+
RUSTDOCFLAGS="-D warnings" cargo doc --all-features --no-deps
1920
@[ "$(git log --pretty='format:%G?' -1 HEAD)" = "N" ] && \
2021
echo "\n⚠️ Unsigned commit: BDK requires that commits be signed." || \
2122
true

0 commit comments

Comments
 (0)