From 1629ae00824435b450ca16ce21e1f7d990cb8ce1 Mon Sep 17 00:00:00 2001 From: Liam <33645555+lj3954@users.noreply.github.com> Date: Tue, 30 Jul 2024 20:40:25 -0700 Subject: [PATCH] chore: Remove duplicate cargo check workflow --- .github/workflows/rust.yml | 60 +++++++++++++++----------------------- 1 file changed, 23 insertions(+), 37 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0b2e12a4..afbaf4bb 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,53 +2,39 @@ name: Rust Checks on: pull_request: - branches: [ "main" ] + branches: ["main"] env: CARGO_TERM_COLOR: always jobs: - cargo_check: - name: Cargo Check - runs-on: ubuntu-latest - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Cache Cargo registry - uses: actions/cache@v4 - with: - path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-registry- - - - name: Cache Cargo index - uses: actions/cache@v4 - with: - path: ~/.cargo/git - key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-index- - - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - - - name: Build - run: cargo check - lints: name: Lints runs-on: ubuntu-latest steps: - - name: Checkout sources - uses: actions/checkout@v4 + - name: Checkout sources + uses: actions/checkout@v4 - - name: Install Rust - uses: dtolnay/rust-toolchain@stable + - name: Install Rust + uses: dtolnay/rust-toolchain@stable - - name: Run cargo fmt - run: cargo fmt --all --check + - name: Cache Cargo registry + uses: actions/cache@v4 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo-registry- - - name: Run cargo clippy - run: cargo clippy + - name: Cache Cargo index + uses: actions/cache@v4 + with: + path: ~/.cargo/git + key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo-index- + + - name: Run cargo clippy + run: cargo clippy + + - name: Run cargo fmt + run: cargo fmt --all --check