Skip to content

Commit

Permalink
changing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
oiwn committed Dec 25, 2024
1 parent c5ee413 commit 342b95d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
File renamed without changes.
44 changes: 44 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# .github/workflows/code-quality.yml
name: Code Quality

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
fmt:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Clippy check
run: cargo clippy --all-features --workspace -- -D warnings

0 comments on commit 342b95d

Please sign in to comment.