Skip to content

Commit

Permalink
Add rust formatting check
Browse files Browse the repository at this point in the history
  • Loading branch information
dkim19375 committed Oct 14, 2023
1 parent 343b4de commit bee9cd1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check rust code formatting

on:
push:
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set cargo fmt output
run: export FMT_OUTPUT=$(cargo fmt --message-format short)
- name: Print cargo fmt output
run: echo $FMT_OUTPUT
- name: Check cargo fmt output
run: if [ -z $FMT_OUTPUT ]; then exit 1; fi

0 comments on commit bee9cd1

Please sign in to comment.