Skip to content

Commit 8282e10

Browse files
authored
Show rustfmt action in example workflow
Show how the related rustfmt action can be used.
1 parent 2f56cd1 commit 8282e10

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ jobs:
2424
- uses: actions/checkout@v3
2525
- uses: actions-rust-lang/setup-rust-toolchain@v1
2626
- run: cargo test --all-features
27+
28+
# Check formatting with rustfmt
29+
formatting:
30+
name: cargo fmt
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v3
34+
# Ensure rustfmt is installed and setup problem matcher
35+
- uses: actions-rust-lang/setup-rust-toolchain@v1
36+
with:
37+
components: rustfmt
38+
- name: Rustfmt Check
39+
uses: actions-rust-lang/rustfmt@v1
2740
```
2841
2942
## Inputs

0 commit comments

Comments
 (0)