box:
  id: golang:alpine
  cmd: /bin/sh

no-response-timeout: 20

services:
  - boostport/hbase-phoenix-all-in-one:1.1.5-4.7.0

build:
  steps:

    - setup-go-workspace

    # Set up enviroment variable
    - script:
        name: set up environment variables
        code: |
          export AVATICA_HOST=http://$HBASE_PHOENIX_ALL_IN_ONE_PORT_8765_TCP_ADDR:8765
    - script:
        code: |
          env

    # Gets the dependencies
    - script:
      name: go vendor
      code: |
        apk update
        apk add git
        go get -u github.com/kardianos/govendor
        govendor sync

    # Build the project
    - script:
        name: go build
        code: |
          go build ./...

    # Test the project
    - script:
        name: go test
        code: |
          go test $(go list ./... | grep -v /vendor/)

    # Invoke goveralls
    - script:
        name: goveralls
        code: |
          go get -u github.com/go-playground/overalls
          go get -u github.com/mattn/goveralls
          overalls -project="$WERCKER_GIT_DOMAIN/$WERCKER_GIT_OWNER/$WERCKER_GIT_REPOSITORY" -covermode=count -ignore=.git,vendor -debug
          GIT_BRANCH=$WERCKER_GIT_BRANCH goveralls -coverprofile=overalls.coverprofile -service=wercker.com -repotoken $COVERALLS_TOKEN

box:
  id: golang:alpine
  cmd: /bin/sh

no-response-timeout: 20

services:
  - boostport/hbase-phoenix-all-in-one:1.1.5-4.7.0

build:
  steps:

    - setup-go-workspace

    # Set up enviroment variable
    - script:
        name: set up environment variables
        code: |
          export AVATICA_HOST=http://$HBASE_PHOENIX_ALL_IN_ONE_PORT_8765_TCP_ADDR:8765
    - script:
        code: |
          env

    # Gets the dependencies
    - script:
      name: go vendor
      code: |
        apk update
        apk add git
        go get -u github.com/kardianos/govendor
        govendor sync

    # Build the project
    - script:
        name: go build
        code: |
          go build ./...

    # Test the project
    - script:
        name: go test
        code: |
          go test $(go list ./... | grep -v /vendor/)

    # Invoke goveralls
    - script:
        name: goveralls
        code: |
          go get -u github.com/go-playground/overalls
          go get -u github.com/mattn/goveralls
          overalls -project="$WERCKER_GIT_DOMAIN/$WERCKER_GIT_OWNER/$WERCKER_GIT_REPOSITORY" -covermode=set -ignore=.git,vendor -debug
          GIT_BRANCH=$WERCKER_GIT_BRANCH goveralls -coverprofile=overalls.coverprofile -service=wercker.com -repotoken $COVERALLS_TOKEN

Use set as covermode when generate coverage report.
Use set as covermode when generate coverage report.
