From 2f6647d85ea280d8bf22204f93b64ed7515dc2c8 Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Sun, 1 Aug 2021 12:44:59 +0000 Subject: [PATCH] Check code style in ci --- .github/workflows/rustfmt.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/rustfmt.yml diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml new file mode 100644 index 0000000..655d2bc --- /dev/null +++ b/.github/workflows/rustfmt.yml @@ -0,0 +1,25 @@ +on: [push, pull_request] + +name: rustfmt + +jobs: + rustfmt: + name: rustfmt + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: rustfmt + + - name: Run cargo fmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check