Skip to content

Commit

Permalink
build: add GitHub action for formatting checking
Browse files Browse the repository at this point in the history
  • Loading branch information
ScarletFlash committed Jan 16, 2022
1 parent c395093 commit 91cd828
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/do-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Do Checks

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
check_formatting:
runs-on: ubuntu-latest
name: Check formatting
steps:
- uses: actions/checkout@v2
- name: Prepare toolchain
run: rustup toolchain install nightly
- name: Install formatter
run: rustup component add rustfmt --toolchain nightly
- name: Check codebase
run: cargo +nightly fmt --all -- --check && echo "All files matching configured formatting rules"

0 comments on commit 91cd828

Please sign in to comment.