Skip to content

Commit

Permalink
Add fmt clippy GHA
Browse files Browse the repository at this point in the history
Signed-off-by: Zvonko Kaiser <[email protected]>

Update rust.yml
  • Loading branch information
zvonkok committed Jun 6, 2024
1 parent cf3bdd2 commit b0f1e54
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,27 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose

- name: Run cargo fmt
run: |
cargo fmt --all -- --check
- name: Check for unformatted code
run: |
if ! git diff --exit-code; then
echo "Code is not formatted. Please run 'cargo fmt' to format the code."
exit 1
fi
- name: Install clippy
run: rustup component add clippy

- name: Run cargo clippy
run: |
cargo clippy --all-targets --all-features -- -D warnings

0 comments on commit b0f1e54

Please sign in to comment.