Skip to content

Merge pull request #5 from nwiizo/add-cargo-clippy #23

Merge pull request #5 from nwiizo/add-cargo-clippy

Merge pull request #5 from nwiizo/add-cargo-clippy #23

Workflow file for this run

name: Rust CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings" # 警告をエラーとして扱う
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run tests
run: cargo test --locked --all-features --verbose
- name: Build
run: cargo build --locked --all-features --verbose