From 71ab96d85b1b245d0f62976b6f431769e15b93dd Mon Sep 17 00:00:00 2001 From: max-ishere <47008271+max-ishere@users.noreply.github.com> Date: Thu, 1 Feb 2024 15:27:39 +0200 Subject: [PATCH] ci: Further split lint steps --- .github/workflows/cargo-lint.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cargo-lint.yml b/.github/workflows/cargo-lint.yml index 3973f42..5c7f1b7 100644 --- a/.github/workflows/cargo-lint.yml +++ b/.github/workflows/cargo-lint.yml @@ -15,7 +15,7 @@ env: CARGO_TERM_COLOR: always jobs: - lint: + clippy: runs-on: ubuntu-latest strategy: matrix: @@ -40,5 +40,19 @@ jobs: - name: clippy run: cargo clippy --no-deps ${{ matrix.target }} --verbose -- -Dwarnings - - name: fmt - run: cargo fmt --all --check --verbose + fmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/cache@v4 + with: + path: target/ + key: cargo-lint-${{ hashFiles('Cargo.lock') }} + restore-keys: | + cargo-lint-${{ hashFiles('Cargo.lock') }} + cargo-lint- + cargo- + + - name: fmt + run: cargo fmt --all --check --verbose