Skip to content

Fix: Actionsを修正 #3

Fix: Actionsを修正

Fix: Actionsを修正 #3

Workflow file for this run

name: Run cargo clippy and cargo fmt
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Cache target directory
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
~/.cargo/registry
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run cargo fmt
run: cargo fmt --all -- --check