Skip to content

Commit

Permalink
CI: add job to validate rustdoc lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Bromeon committed Aug 6, 2023
1 parent 80e82ab commit 558fd9e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/full-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,25 @@ jobs:
run: cargo fmt --all -- --check


# Needs to be its own job (apart from sync-doc), because lints don't work with --no-deps, and because it contributes to ci-status.
doc-lints:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: "Install Rust"
uses: ./.github/composite/rust
with:
components: rustdoc

- name: "Check rustdoc"
env:
RUSTDOCFLAGS: >
-D rustdoc::broken-intra-doc-links -D rustdoc::private-intra-doc-links -D rustdoc::invalid-codeblock-attributes
-D rustdoc::invalid-rust-codeblocks -D rustdoc::invalid-html-tags -D rustdoc::bare-urls -D rustdoc::unescaped-backticks
run: cargo doc -p godot


clippy:
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -299,6 +318,7 @@ jobs:
if: always() && (github.event_name == 'merge_group' || github.event_name == 'push')
needs:
- rustfmt
- doc-lints
- clippy
- unit-test
- godot-itest
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/minimal-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,25 @@ jobs:
run: cargo fmt --all -- --check


# Needs to be its own job (apart from sync-doc), because lints don't work with --no-deps, and because it contributes to ci-status.
doc-lints:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: "Install Rust"
uses: ./.github/composite/rust
with:
components: rustdoc

- name: "Check rustdoc"
env:
RUSTDOCFLAGS: >
-D rustdoc::broken-intra-doc-links -D rustdoc::private-intra-doc-links -D rustdoc::invalid-codeblock-attributes
-D rustdoc::invalid-rust-codeblocks -D rustdoc::invalid-html-tags -D rustdoc::bare-urls -D rustdoc::unescaped-backticks
run: cargo doc -p godot


clippy:
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -201,6 +220,7 @@ jobs:
if: always()
needs:
- rustfmt
- doc-lints
- clippy
- unit-test
- godot-itest
Expand Down

0 comments on commit 558fd9e

Please sign in to comment.