Skip to content

Commit f701f52

Browse files
authored
ci: check docs (#356)
* ci: check docs * fix: unused variable warning on wasm
1 parent d34afe9 commit f701f52

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
env:
1010
CARGO_TARGET_WASM32_WASIP1_RUNNER: "/home/runner/.wasmtime/bin/wasmtime --dir /tmp/"
1111
CARGO_TARGET_WASM32_WASIP2_RUNNER: "/home/runner/.wasmtime/bin/wasmtime --dir /tmp/"
12+
RUSTFLAGS: "-D warnings"
1213

1314
name: CI
1415
jobs:
@@ -88,7 +89,7 @@ jobs:
8889
- name: Build
8990
run: cargo build --target wasm32-unknown-unknown
9091
lint:
91-
name: Clippy and fmt
92+
name: Clippy, fmt, and docs
9293
runs-on: ubuntu-latest
9394
steps:
9495
- name: Checkout
@@ -99,5 +100,9 @@ jobs:
99100
components: clippy, rustfmt
100101
- name: Check formatting
101102
run: cargo fmt --check
103+
- name: Check documentation
104+
run: cargo doc --all --no-deps
105+
- name: Check for clippy lints
106+
run: cargo clippy
102107
- name: Check for clippy lints
103108
run: cargo clippy

src/util.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ pub fn create_helper<R>(
6262
rng.seed(seed);
6363
}
6464
}
65+
let _ = i; // avoid unused variable warning for the above.
66+
6567
let path = base.join(tmpname(&mut rng, prefix, suffix, random_len));
6668
return match f(path) {
6769
Err(ref e) if e.kind() == io::ErrorKind::AlreadyExists && num_retries > 1 => continue,

0 commit comments

Comments
 (0)