name: Lints
on: [pull_request]
env:
RUSTFLAGS: -D warnings
jobs:
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.65.0
override: true
components: rustfmt, clippy
- name: Install cargo-machete
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-machete
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --fix -- -D warnings
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo machete
uses: actions-rs/cargo@v1
with:
command: machete