Skip to content

Run Clippy in CI

Run Clippy in CI #131

Workflow file for this run

name: Rust
on:
push:
branches: [dev]
pull_request:
branches: [dev]
env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
build_and_test:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install stable rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- name: Use caching
uses: Swatinem/[email protected]
- name: Clippy
run: cargo clippy --all-features --all-targets -- -D warnings
- name: Build
run: cargo build
- name: "Test"
# Run all tests (bins, examples, lib, integration and docs)
# https://doc.rust-lang.org/cargo/commands/cargo-test.html#target-selection
run: cargo test
- name: "Check documentation"
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --no-deps --document-private-items --all-features --workspace --examples
rustfmt:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/[email protected]
- name: Check formatting
run: cargo fmt --check --all