From 36dcfa86c840cbd416b5ed282e361eb83f963053 Mon Sep 17 00:00:00 2001 From: wenjianzhang Date: Wed, 18 Mar 2020 23:18:24 +0800 Subject: [PATCH] Update go.yml --- .github/workflows/go.yml | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1b8d7c1b..e7a294bd 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,29 +1,34 @@ -name: build -on: [push, pull_request] +name: Go + +on: + push: + branches: [ dev ] + pull_request: + branches: [ dev ] + jobs: build: name: Build runs-on: ubuntu-latest - env: - GOPATH: ${{ github.workspace }}/go - strategy: - matrix: - go: [1.13] steps: - - name: Set up Go ${{ matrix.go }} + - name: Set up Go 1.13 uses: actions/setup-go@v1 with: - go-version: ${{ matrix.go }} + go-version: 1.13 id: go - - name: Check out code into GOPATH + - name: Check out code into the Go module directory uses: actions/checkout@v2 - with: - path: go/src/firebase.google.com/go - - - name: log path - run: ls - + - 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: Build + run: go build -v .