Skip to content

Commit

Permalink
add gha to check formatting (#338)
Browse files Browse the repository at this point in the history
Signed-off-by: Caleb Lloyd <[email protected]>
  • Loading branch information
caleblloyd authored Jan 17, 2024
1 parent b503fd5 commit 25aff25
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Format

on:
pull_request: {}

jobs:
check:
name: check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'

- name: Check formatting
run: |
if dotnet format --verify-no-changes; then
echo "formatting passed"
else
rc="$?"
echo "formatting failed; run 'dotnet format'" >&2
exit "$rc"
fi

0 comments on commit 25aff25

Please sign in to comment.