chore(deps): bump actions/cache from 3 to 4 #117
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [pull_request] | |
name: Clippy | |
env: | |
RUST_VERSION: nightly-2022-09-13 | |
jobs: | |
clippy_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
components: clippy, rustfmt | |
toolchain: ${{ env.RUST_VERSION }} | |
override: true | |
- name: Cache packages | |
id: cache-cargo | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ env.RUST_VERSION }}-${{ hashFiles('**/Cargo.lock') }}-clippy | |
restore-keys: | | |
${{ runner.os }}-cargo-${{ env.RUST_VERSION }}-${{ hashFiles('**/Cargo.lock') }} | |
${{ runner.os }}-cargo-${{ env.RUST_VERSION }} | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
toolchain: ${{ env.RUST_VERSION }} | |
args: --all -- --check | |
- name: Install cargo-lints | |
# Cargo lints is most likely already installed in the cache, so || true to prevent failure | |
run: cargo install cargo-lints || true | |
- name: Clippy lints | |
run: cargo lints clippy --all-targets |