From e20af6ffd12152035d0d1b26a2d6cf39d7377734 Mon Sep 17 00:00:00 2001 From: Tran Hau Date: Mon, 18 Jan 2021 17:14:37 +0700 Subject: [PATCH] chore: add golang in github action --- .github/workflows/go.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/go.yaml diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml new file mode 100644 index 0000000..ab2ef0d --- /dev/null +++ b/.github/workflows/go.yaml @@ -0,0 +1,35 @@ +name: Go + +on: [push, pull_request] + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: 1.15 + - run: go version + - run: go test -race ./... + build-gotip: + name: Build using gotip + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: 1.15 + - run: go get golang.org/dl/gotip + - run: gotip download + - run: gotip version + - run: gotip build + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: golangci/golangci-lint-action@v2 + with: + version: v1.34