Skip to content

Commit

Permalink
Add gofmt formatting check to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mfridman committed Apr 15, 2022
1 parent 8f53c35 commit b7c7a8d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ jobs:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Check Go code formatting
run: |
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
gofmt -s -l .
echo "Please format Go code by running: go fmt ./..."
exit 1
fi
- name: Run tests
run: |
mkdir -p bin
Expand Down

0 comments on commit b7c7a8d

Please sign in to comment.