From cdd49ada2b775d89d6f4248e21becc6dfb655549 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Mon, 20 Jan 2020 23:56:04 +0100 Subject: [PATCH] Add a GitHub action for rustfmt Checks formatting against the default `cargo fmt` run. --- .github/workflows/cpal.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/cpal.yml b/.github/workflows/cpal.yml index 805d723..166483e 100644 --- a/.github/workflows/cpal.yml +++ b/.github/workflows/cpal.yml @@ -24,6 +24,23 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} args: --all --all-features + rustfmt-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Install stable + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: rustfmt + - name: Run rustfmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all --check + cargo-publish: if: github.event_name == 'push' && github.ref == 'refs/heads/master'