Introduce a cargo clippy
run
#2
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: Lint | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install formatting dependencies | |
run: | | |
sudo apt update | |
sudo apt install gettext yapf3 | |
- name: Install nightly rustfmt | |
run: | | |
rustup default nightly | |
rustup component add rustfmt | |
- name: Check formatting | |
uses: dprint/[email protected] | |
typos: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check for typos | |
uses: crate-ci/[email protected] | |
with: | |
config: ./.github/typos.toml | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Rust cache | |
uses: ./.github/workflows/setup-rust-cache | |
- name: Clippy | |
run: cargo clippy |