Skip to content

Commit

Permalink
Setup rust.yml gh action - clippy, fmt and build
Browse files Browse the repository at this point in the history
  • Loading branch information
panarch committed Aug 27, 2024
1 parent e84da38 commit 143fc87
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Rust

on:
push:
branches: [ "main" ]
paths-ignore:
- "docs/**"
pull_request:
branches: [ "main" ]
paths-ignore:
- "docs/**"

env:
CARGO_TERM_COLOR: always

jobs:
clippy_workspace:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets -- -D warnings

rust_fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: |
cargo fmt -- --check
rust_build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: cargo build --all-features --verbose

0 comments on commit 143fc87

Please sign in to comment.