Skip to content

Merge pull request #28 from sio2project/refactor #78

Merge pull request #28 from sio2project/refactor

Merge pull request #28 from sio2project/refactor #78

Workflow file for this run

name: Run cargo fmt and clippy
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run cargo fmt
run: cargo fmt --check
- name: Run cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings