From 9a55b19297e6e2c94fd2b310204968959bebdb57 Mon Sep 17 00:00:00 2001 From: Joshua Wong Date: Thu, 29 Feb 2024 22:05:45 -0600 Subject: [PATCH] ci: run clippy in the CI --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1744b6c2..de5258c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,12 +11,26 @@ jobs: name: Linux Tester runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@stable + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - run: cargo test --workspace + format: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: rustfmt + - name: run rustfmt + uses: actions-rust-lang/rustfmt@v1 + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: stable - components: rustfmt clippy rust-src - - uses: Swatinem/rust-cache@v2 - - run: cargo test - - run: cargo check - - run: cargo fmt --all --check + components: clippy + - name: run clippy + run: cargo clippy --workspace