os:
 - linux
sudo: required
dist: trusty
language: go
go:
 - 1.6
 - 1.7
services:
 - docker
before_install:
 - sudo apt-get -qq update
 - sudo apt-get install -y libsystemd-journal-dev
install:
 - mkdir -p $HOME/gopath/src/k8s.io
 - mv $TRAVIS_BUILD_DIR $HOME/gopath/src/k8s.io/node-problem-detector
 - cd $HOME/gopath/src/k8s.io/node-problem-detector
script:
 - make test
 - make

os:
 - linux
sudo: required
dist: trusty
language: go
go:
 - 1.6
 - 1.7
services:
 - docker
before_install:
 - sudo apt-get -qq update
 - sudo apt-get install -y libsystemd-journal-dev
install:
 - mkdir -p $HOME/gopath/src/k8s.io
 - mv $TRAVIS_BUILD_DIR $HOME/gopath/src/k8s.io/node-problem-detector
 - cd $HOME/gopath/src/k8s.io/node-problem-detector
jobs:
  include:
    - stage: Test
      script: make test
    - stage: Build
      script: make

Split Test and Build in Different Stages
Split Test and Build in Different Stages