mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-04 12:52:27 +08:00
rebase release-2.0
This commit is contained in:
41
.github/workflows/go.yml
vendored
Normal file
41
.github/workflows/go.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Go
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master,release-* ]
|
||||
pull_request:
|
||||
branches: [ master,release-* ]
|
||||
|
||||
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
|
||||
id: go
|
||||
|
||||
- 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
|
||||
|
||||
- name: Lint Go Code
|
||||
run: |
|
||||
export PATH=$PATH:$(go env GOPATH)/bin # temporary fix. See https://github.com/actions/setup-go/issues/14
|
||||
go get -u golang.org/x/lint/golint
|
||||
go vet ./...
|
||||
golint -set_exit_status $(go list ./...)
|
||||
|
||||
- name: Test
|
||||
run: go test -v -race ./...
|
||||
Reference in New Issue
Block a user