Skip to content

Commit

Permalink
Merge pull request #50 from longwuyuan/master
Browse files Browse the repository at this point in the history
added github-actions CI
  • Loading branch information
k8s-ci-robot committed Jan 26, 2021
2 parents 8f01418 + 4750a07 commit 9f315c2
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/go.yml
@@ -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 9f315c2

Please sign in to comment.