From fb811d09132788396437f186b1d585884396e8d6 Mon Sep 17 00:00:00 2001 From: Tran Hau Date: Fri, 16 Apr 2021 07:22:14 +0000 Subject: [PATCH] chore: update go in github action --- .github/workflows/go.yaml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index a5cf265..a7aaef0 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -1,6 +1,12 @@ name: Go -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: + branches: + - main jobs: test: @@ -10,21 +16,20 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: 1.16 - - run: go version + go-version: "~1.16" - run: go test -race ./... - build-gotip: - name: Build using gotip - runs-on: ubuntu-latest + build: + name: Build + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: 1.16 - - run: go get golang.org/dl/gotip - - run: gotip download - - run: gotip version - - run: gotip build main.go + go-version: "~1.16" + - run: go build lint: name: Lint runs-on: ubuntu-latest @@ -32,4 +37,4 @@ jobs: - uses: actions/checkout@v2 - uses: golangci/golangci-lint-action@v2 with: - version: v1.37 + version: latest