Create action for linting

This commit is contained in:
Ngô Ngọc Đức Huy 2020-10-30 11:16:44 +07:00 committed by Huy-Ngo
parent 6f57fecd4d
commit eb17d2b829
1 changed files with 38 additions and 0 deletions

38
.github/workflows/go.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- uses: Jerome1337/golint-action@v1.0.2
with:
golint-path: './main.go'
- name: Build
run: go build -v .