Skip to content

Commit

Permalink
ci: add go CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Zelldon committed Feb 14, 2022
1 parent 7e09c45 commit 778dfac
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Go CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Format
uses: actions/github-script@v3
with:
script: |
go fmt -v ./...
if [ -n "$(git status --porcelain)" ]
then
core.setFailed('Some files are not following the go format, run gofmt and fix your files.')
fi
- name: Test
run: go test -v ./...

0 comments on commit 778dfac

Please sign in to comment.