Skip to content

Commit

Permalink
Merge pull request #10 from sparkfish/chore/cargo-fmt-clippy
Browse files Browse the repository at this point in the history
chore: Run `cargo fmt` and `cargo clippy` in CI
  • Loading branch information
edgarrmondragon authored Apr 11, 2023
2 parents b452042 + e8d139d commit 52b8815
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,33 @@ on:
branches:
- dev
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
cargo-fmt:
name: "cargo fmt"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Install Rust toolchain"
run: rustup component add rustfmt
- run: cargo fmt --check

cargo-clippy:
name: "cargo clippy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Install Rust toolchain"
run: |
rustup component add clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy

pre-commit:
runs-on: ubuntu-latest
env:
Expand Down

0 comments on commit 52b8815

Please sign in to comment.