Merge pull request #51 from cloudskiff/fix/fail_on_bad_fmt

add fmt check in ci
main
William BEUIL 2020-12-23 11:16:40 +01:00 committed by GitHub
commit 6aa5da86ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 24 deletions

View File

@ -17,6 +17,17 @@ jobs:
- image: golang:1.15
steps:
- checkout
- run:
name: Enforce Go Formatted Code
command: |
go fmt ./...
if [[ -z $(git status --porcelain) ]]; then
echo "Git directory is clean."
else
echo "Git directory is dirty. Run make fmt locally and commit any formatting fixes or generated code."
git status --porcelain
exit 1
fi
- run: make install-tools
- run: make test
- run: