From 664745ae1298782f1cbc3556719edd6ab5ca817c Mon Sep 17 00:00:00 2001 From: Yang Zhou Date: Sat, 11 Jan 2025 22:11:11 -0500 Subject: [PATCH] [FEAT] add typos check / cache to CI (#23) * [FEAT] add typos check / cache to CI * [FIX] clippy deny warnings --- .config/_typos.toml | 0 .github/workflows/CI.yml | 27 +++++++++++++++++++++------ Cargo.toml | 6 +++--- src/lib.rs | 2 +- 4 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 .config/_typos.toml diff --git a/.config/_typos.toml b/.config/_typos.toml new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a566d920a..b8ce183e5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,11 +17,26 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v4 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --all-features --verbose + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + - name: Setup rust-cache + uses: Swatinem/rust-cache@v2 - name: Check Formating - run: cargo fmt --all -- --check + run: cargo +stable fmt --all -- --check - name: Run Clippy - run: cargo clippy -- -D warnings + run: cargo +stable clippy --workspace --all-targets --all-features -- --deny warnings + - name: Build + run: cargo +stable build --workspace --all-targets --all-features + - name: Run tests + run: cargo +stable test --doc --workspace + typos: + name: Typos Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: crate-ci/typos@master + with: + config: ./.config/_typos.toml diff --git a/Cargo.toml b/Cargo.toml index 92a9a69bc..5f59646fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,10 +31,10 @@ nalgebra = "0.33.2" rand = { version = "0.8.5", features = ["rand_chacha"] } rand_distr = "0.4.3" rerun = "0.21.0" -thiserror = "2.0.7" -serde = { version = "1.0.216", features = ["derive"] } +thiserror = "2.0.11" +serde = { version = "1.0.217", features = ["derive"] } serde_yaml = "0.9.34" -env_logger = "0.11.5" +env_logger = "0.11.6" log = "0.4.22" rayon = "1.10.0" rand_chacha = "0.3.1" diff --git a/src/lib.rs b/src/lib.rs index d23669a72..d982c56e2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -487,7 +487,7 @@ impl Imu { /// PID controller for quadrotor position and attitude control /// /// The kpid_pos and kpid_att gains are following the format of -/// porportional, derivative and integral gains +/// proportional, derivative and integral gains /// # Example /// ``` /// use nalgebra::Vector3;