Adding simple goimports check and build check CI.

This commit is contained in:
Renan DelValle 2020-10-14 20:27:25 -07:00
parent 7967188513
commit a7750c5c98
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9

23
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,23 @@
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Go for use with actions
uses: actions/setup-go@v1.0.0
with:
version: 1.15
- name: Install goimports
run: go get golang.org/x/tools/cmd/goimports
- name: Run goimports check
run: test -z "`for d in $GO_USR_DIRS; do goimports -d $d/*.go | tee /dev/stderr; done`"
env:
GO_USR_DIRS: $(go list -f {{.Dir}} ./... | grep -E -v "/gen-go/|/vendor/")
- name: Run tests
run: go build -o australis *.go