Skip to content

Commit

Permalink
ci: add check ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRibera committed Mar 18, 2024
1 parent 35f53ce commit a354830
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check Format and Code Quality
on:
workflow_dispatch:
workflow_call:
pull_request:
push:
branches:
- main
paths:
- "src/**/**.rs"

jobs:
check-fmt:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: check format
run: |
cargo fmt --all --check
check-clippy:
needs: [check-fmt]
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: cargo clippy
run: |
cargo clippy -- -D warnings

0 comments on commit a354830

Please sign in to comment.