From e140a1540b8a4c3957d05f1387865fc9f4a39770 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 25 Oct 2021 14:20:59 +0200 Subject: [PATCH] Check formatting in CI --- .github/workflows/rust.yml | 21 +++++++++++++++++++++ rustfmt.toml | 1 + 2 files changed, 22 insertions(+) create mode 100644 rustfmt.toml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b6d77da..2ee3bf2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -63,6 +63,27 @@ jobs: if: matrix.os == 'macos-latest' run: sudo bash integration-tests/macos.sh + format: + name: Format + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + with: + persist-credentials: false + - name: Install rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + default: true + components: rustfmt + - name: Check formatting + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + clippy: name: Clippy runs-on: ubuntu-latest diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..e70b64a --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1 @@ +chain_width=40