language: go
go:
- 1.8
install:
- mkdir -p $HOME/gopath/src/k8s.io
- mv $TRAVIS_BUILD_DIR $HOME/gopath/src/k8s.io/kube-state-metrics
script:
- make test-unit
- make

language: go
go:
- 1.8
install:
- mkdir -p $HOME/gopath/src/k8s.io
- mv $TRAVIS_BUILD_DIR $HOME/gopath/src/k8s.io/kube-state-metrics
jobs:
  include:
    - stage: Unit Test
      script: make test-unit
    - stage: Build
      script: make

Split the UT and Build in different Stages
Split the UT and Build in different Stages