diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index b9e74256..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: go build - + - 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 .