Skip to content

Commit

Permalink
added github-actions CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Long committed Jan 26, 2021
1 parent 8f01418 commit 4750a07
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

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
go-versions: [1.12.x, 1.13.x, 1.14.x]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-versions }}
- name: Install
run: GO111MODULE=off go get golang.org/x/lint/golint
- name: Run gofmt
run: diff -u <(echo -n) <(gofmt -d *.go)
- name: Run golint
run: diff -u <(echo -n) <(golint $(go list -e ./...) | grep -v YAMLToJSON)
- name: Run go vet
run: GO111MODULE=on go vet .
- name: Run go test
run: GO111MODULE=on go test -v -race ./...
- name: Check diff
run: git diff --exit-code

0 comments on commit 4750a07

Please sign in to comment.