Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
[ci] add fmt check (#1733)
Browse files Browse the repository at this point in the history
* [ci] add fmt check

* fix name

* remove gha from branches
  • Loading branch information
alvicsam authored Oct 5, 2022
1 parent c06dea3 commit 4635068
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/fmt-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Rustfmt check

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
quick_check:
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Install Rust nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: clippy, rustfmt

- name: Cache Dependencies & Build Outputs
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- uses: actions/checkout@v3

- name: Cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

0 comments on commit 4635068

Please sign in to comment.