Always force install github cargo to fix command not found linting error #13
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
name: Run linters | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
components: clippy, rustfmt | |
- name: Use cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install cargo binstall | |
uses: taiki-e/install-action@cargo-binstall | |
- name: Install cargo check tools | |
run: | | |
cargo binstall --force --locked -y cargo-outdated | |
cargo binstall --force --locked -y cargo-udeps | |
cargo binstall --force --locked -y cargo-audit | |
cargo binstall --force --locked -y cargo-pants | |
- name: Run clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
- name: Run fmt | |
run: cargo fmt --all -- --check | |
- name: Run outdated | |
run: cargo outdated --exit-code 1 | |
- name: Run udeps | |
run: cargo udeps | |
- name: Run audit | |
run: cargo audit | |
- name: Run pants | |
run: cargo pants |