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

[ci] add fmt check #1733

Merged
merged 3 commits into from
Oct 5, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/fmt-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Rustfmt check

on:
push:
branches:
- "*"
alvicsam marked this conversation as resolved.
Show resolved Hide resolved
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