add go format checking
This commit is contained in:
parent
00dfcb1070
commit
db855d4ecc
1 changed files with 9 additions and 2 deletions
11
.github/workflows/go.yml
vendored
11
.github/workflows/go.yml
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
# This workflow will build a golang project
|
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
|
||||||
# For more information see: 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
|
name: Go
|
||||||
|
|
||||||
|
|
@ -11,6 +11,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -21,6 +22,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version: 1.19
|
go-version: 1.19
|
||||||
|
|
||||||
|
- name: Check formatting
|
||||||
|
uses: Jerome1337/gofmt-action@v1.0.5
|
||||||
|
with:
|
||||||
|
gofmt-path: './...'
|
||||||
|
gofmt-flags: '-l -d'
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build -v ./...
|
run: go build -v ./...
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue