Skip to content

update lint action

update lint action #3

Workflow file for this run

name: Lint
on:
pull_request:
runs:
using: composite
steps:
- name: Setup Rust
uses: dtolnay/[email protected]
with:
components: clippy,rustfmt
- name: Check rust version after install
run: |
rustc --version;
cargo --version;
cargo clippy --version;
cargo fmt --version;
shell: bash
- name: Setup rust lint cache
uses: actions/cache@v3
with:
path: |
~/.cargo/
target/
key: ${{ runner.os }}-cargo-lint-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Rust tools
run: cargo install cargo-sort --locked
shell: bash
- name: Cargo sort
run: cargo sort --workspace --check
shell: bash
- name: Cargo fmt
run: cargo fmt --all --check
shell: bash
- name: Clippy check
run: cargo clippy --all-features --all-targets --tests -- -D warning