From 906b5f6249be367221e808e1971e24e37760dab2 Mon Sep 17 00:00:00 2001 From: Flavio Castelli Date: Tue, 9 Apr 2024 18:58:24 +0200 Subject: [PATCH] ci: require docs to be fine Build the documentation as part of PRs. Fail when something wrong is found while building the docs. Signed-off-by: Flavio Castelli --- .github/workflows/tests.yml | 13 +++++++++++++ Makefile | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 426a8ddab4..234472691c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,6 +48,19 @@ jobs: command: test args: --workspace --features full-native-tls,test-registry + doc: + name: Build Documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 + with: + profile: minimal + toolchain: nightly + override: true + - run: | + make doc + fmt: name: Rustfmt runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index ded4560c9a..c05cbf9a0c 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ lint: .PHONY: doc doc: - cargo doc + RUSTDOCFLAGS="--cfg docsrs -D warnings" cargo +nightly doc --all-features --no-deps .PHONY: test test: fmt lint doc