diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cfe84eac2..ac1613e75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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