Skip to content

Commit

Permalink
ci: add lint and format
Browse files Browse the repository at this point in the history
  • Loading branch information
ok-nick committed Apr 24, 2024
1 parent 416d00b commit e3c9ed9
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: check
on:
workflow_dispatch:
push:
paths:
- "**.rs"
- "**/Cargo.toml"
- ".github/workflows/check.yml"
pull_request:
paths:
- "**.rs"
- "**/Cargo.toml"
- ".github/workflows/check.yml"

jobs:
lint:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- uses: Swatinem/rust-cache@v2

- name: clippy
run: cargo clippy --all-features
env:
RUSTFLAGS: "-Dwarnings"

format:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: rustfmt
run: cargo fmt --all -- --check

0 comments on commit e3c9ed9

Please sign in to comment.