ci: add gofmt check

Signed-off-by: Shuoran Liu <shuoranliu@gmail.com>
This commit is contained in:
Shuoran Liu 2021-09-17 18:56:50 +08:00
parent bb6e090252
commit 5191a4d1b4

View File

@ -15,6 +15,11 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Check gofmt
run: |
find . -type f -name "*.go" | grep -v 'vendor' | xargs gofmt -l > gofmt_results.txt
cat gofmt_results.txt
if [ "$(cat gofmt_results.txt|wc -l)" -gt 0 ]; then exit 1; fi
- name: Build and run CI tests
run: |
docker/run_docker.sh -t