Fail CI on cargo doc warnings (#2012)

* makes CI fails on cargo doc warnings
* adds this check in bors

doc warnings are listed here: https://doc.rust-lang.org/rustdoc/lints.html

Currently the warnings emitted are:
* broken_intra_doc_links
* private_intra_doc_links
* invalid_codeblock_attributes
This commit is contained in:
François 2021-04-27 02:17:12 +00:00
parent c32c37d737
commit 723fe91183
2 changed files with 6 additions and 3 deletions

1
.github/bors.toml vendored
View file

@ -8,6 +8,7 @@ status = [
"build-android",
"markdownlint",
"run-examples",
"check-doc",
]
use_squash_merge = true

View file

@ -129,7 +129,7 @@ jobs:
sleep 10
done
deadlinks:
check-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@ -138,6 +138,8 @@ jobs:
if: runner.os == 'linux'
- name: Installs cargo-deadlinks
run: cargo install cargo-deadlinks
- name: Checks dead doc links
run: cargo doc --all-features --no-deps && cargo deadlinks --dir target/doc/bevy
- name: Build and check doc
run: RUSTDOCFLAGS='-D warnings' cargo doc --all-features --no-deps
- name: Checks dead links
run: cargo deadlinks --dir target/doc/bevy
continue-on-error: true