add go format checking

This commit is contained in:
Peter Rounce 2023-01-29 10:51:46 +00:00 committed by GitHub
parent 00dfcb1070
commit db855d4ecc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
# https://github.com/marketplace/actions/check-code-formatting-using-gofmt
name: Go
@ -11,6 +11,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
steps:
@ -21,6 +22,12 @@ jobs:
with:
go-version: 1.19
- name: Check formatting
uses: Jerome1337/gofmt-action@v1.0.5
with:
gofmt-path: './...'
gofmt-flags: '-l -d'
- name: Build
run: go build -v ./...