From 3d2d2910063b494c2409ca982bfb5b4349d38970 Mon Sep 17 00:00:00 2001 From: Sunil Thakare Date: Sun, 21 Jun 2026 20:22:06 +0530 Subject: [PATCH] ci: install rustfmt and clippy components --- .github/workflows/rust.yml | 51 ++++++++++++-------------------------- 1 file changed, 16 insertions(+), 35 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7447c99..931887c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,41 +1,22 @@ -name: Rust +- uses: actions/checkout@v4 -on: - push: - branches: - - main - pull_request: +- name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ matrix.rust }} + components: rustfmt, clippy -jobs: - test: +- name: Cache Cargo + uses: Swatinem/rust-cache@v2 - strategy: - matrix: - rust: - - stable - - beta +- name: Check formatting + run: cargo fmt --check - runs-on: ubuntu-latest +- name: Clippy + run: cargo clippy --all-targets -- -D warnings - steps: - - uses: actions/checkout@v4 +- name: Tests + run: cargo test --all - - name: Install Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.rust }} - - - name: Cache Cargo - uses: Swatinem/rust-cache@v2 - - - name: Check formatting - run: cargo fmt --check - - - name: Clippy - run: cargo clippy --all-targets -- -D warnings - - - name: Tests - run: cargo test --all - - - name: Release build - run: cargo build --release +- name: Release build + run: cargo build --release \ No newline at end of file