blob: 608bbc81d95f49bed6dcf4c59507a06458b9b1eb [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
box:
id: golang:1.9-alpine
cmd: /bin/sh
no-response-timeout: 20
services:
- boostport/hbase-phoenix-all-in-one:1.3-4.13
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: get dependencies
code: |
apk update
apk add git
go get -u github.com/golang/dep/cmd/dep
dep ensure -v
# Build the project
- script:
name: go build
code: |
go build
# Test the project
- script:
name: go test
code: |
go test -cover -v $(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,message -debug
GIT_BRANCH=$WERCKER_GIT_BRANCH goveralls -coverprofile=overalls.coverprofile -service=wercker.com -repotoken $COVERALLS_TOKEN