Fix doc warnings #115
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: "-D warnings" | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Run cargo check | |
run: cargo check --all-targets --all-features | |
test: | |
name: Test Suite | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
rust: [stable] | |
include: | |
- os: ubuntu-latest | |
rust: nightly | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Run tests | |
run: cargo test --all-targets --all-features | |
- name: Run doc tests | |
run: cargo test --doc | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: Check formatting | |
run: cargo fmt --all -- --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Run clippy | |
run: cargo clippy --all-targets --all-features | |
docs: | |
name: Docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Check documentation | |
env: | |
RUSTDOCFLAGS: "-D warnings" | |
run: cargo doc --no-deps --document-private-items |