Skip to content

Commit

Permalink
factor lint ci
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarriba committed Jan 9, 2025
1 parent ad4f405 commit 0c3954e
Showing 1 changed file with 6 additions and 28 deletions.
34 changes: 6 additions & 28 deletions .github/workflows/rust_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: rustup toolchain install stable --component rustfmt
- 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: giraffate/clippy-action@v1
with:
reporter: 'github-pr-review'
github_token: ${{ secrets.GITHUB_TOKEN }}
clippy_flags: -- -D warnings
- run: rustup toolchain install stable --component clippy
- run: cargo clippy --all-features -- -D warnings

check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
args: --all --all-features
use-cross: true
- run: rustup toolchain install stable
- run: cargo check --all --all-features

0 comments on commit 0c3954e

Please sign in to comment.