Skip to content

Commit

Permalink
ci: Add cargo fmt job
Browse files Browse the repository at this point in the history
  • Loading branch information
aidan46 committed May 10, 2024
1 parent b3e5721 commit 1a0fdd7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,20 @@ jobs:
run: |
echo 'TOML is not formatted correctly'
echo 'Please run `taplo format`'
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: List version
run: |
cargo --version
cargo fmt --version
- name: Cargo format
run: cargo fmt --all -- --check
- name: Cargo fmt failure info
if: failure()
run: |
echo '.rs files are not formatted correctly'
echo 'Please run `cargo fmt --all`'

0 comments on commit 1a0fdd7

Please sign in to comment.