Skip to content

(ci): add basic workflow for linting Rust code #14

(ci): add basic workflow for linting Rust code

(ci): add basic workflow for linting Rust code #14

Workflow file for this run

name: CI
on:
pull_request:
branches: [master]
jobs:
build-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install protoc
uses: arduino/setup-protoc@v3
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all --check
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings