mirror of https://github.com/pressly/goose.git
Add gofmt formatting check to CI
parent
8f53c35cc4
commit
b7c7a8dc0f
|
@ -25,6 +25,13 @@ jobs:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
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
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
|
|
Loading…
Reference in New Issue