Skip to content

Commit

Permalink
add global format checking (#2105)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Dec 21, 2021
1 parent 76aa73c commit f33dc82
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,10 @@ jobs:
- name: Install dependencies
run: |
cargo install cargo-hack
curl -fsSLO https://github.com/dprint/dprint/releases/download/0.18.2/dprint-x86_64-unknown-linux-gnu.zip
unzip -o dprint-x86_64-unknown-linux-gnu.zip dprint -d ~/.cargo/bin/
rm -f dprint-x86_64-unknown-linux-gnu.zip
- name: Run formatting checks
run: |
cargo fmt --all -- --check
dprint check
- name: Run linting checks
run : |
# do not produce debug symbols to keep memory usage down
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/fmt_all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Check formatting

on:
- pull_request
jobs:
test-fmt-all:
name: Test global formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
curl -fsSLO https://github.com/dprint/dprint/releases/download/0.18.2/dprint-x86_64-unknown-linux-gnu.zip
unzip -o dprint-x86_64-unknown-linux-gnu.zip dprint -d ~/.cargo/bin/
rm -f dprint-x86_64-unknown-linux-gnu.zip
- name: Run formatting checks
run: |
dprint check

0 comments on commit f33dc82

Please sign in to comment.