Skip to content

Commit

Permalink
CI: Check formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
aschaeffer committed Apr 28, 2024
1 parent 73b1236 commit 8b8faae
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Formatting

on:
push:
branches: [ main ]
paths:
- "src/**/*.rs"
- "Cargo.toml"
- ".github/workflows/fmt.yml"
pull_request:
branches: [ main ]
paths:
- "src/**/*.rs"
- "Cargo.toml"
- ".github/workflows/fmt.yml"

env:
CARGO_TERM_COLOR: always

jobs:
rustfmt:
name: Verify code formatting
runs-on: ubuntu-latest
steps:
- name: VCS Checkout
uses: actions/checkout@v3
- name: Install rust (latest stable)
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: "fmt"
args: "--all -- --check"

0 comments on commit 8b8faae

Please sign in to comment.