From 8282e105273da46ee9029309d681adc67f976c8e Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Wed, 27 Jul 2022 20:42:53 +0200 Subject: [PATCH] Show rustfmt action in example workflow Show how the related rustfmt action can be used. --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index fb0d2e8..1108dc5 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,19 @@ jobs: - uses: actions/checkout@v3 - uses: actions-rust-lang/setup-rust-toolchain@v1 - run: cargo test --all-features + + # Check formatting with rustfmt + formatting: + name: cargo fmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # Ensure rustfmt is installed and setup problem matcher + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: rustfmt + - name: Rustfmt Check + uses: actions-rust-lang/rustfmt@v1 ``` ## Inputs