box: golang:1.6

services:
  - id: postgres:9.4
    env:
      POSTGRES_PASSWORD: password
      POSTGRES_USER: nogo

# Build definition
build:
  # The steps that will be executed on build
  steps:
    - setup-go-workspace

    # Gets the public dependencies
    - script:
        name: go get
        code: |
         go get -t ./...

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

    # Test the project
    - script:
        name: go test
        code: |
          export POSTGRES_DSN="user=nogo password=password host=$POSTGRES_PORT_5432_TCP_ADDR port=$POSTGRES_PORT_5432_TCP_PORT sslmode=disable dbname=nogo"
          go test ./...

box: golang:1.7

services:
  - id: postgres:9.5
    env:
      POSTGRES_PASSWORD: password
      POSTGRES_USER: nogo

# Build definition
build:
  # The steps that will be executed on build
  steps:
    - setup-go-workspace

    # Gets the public dependencies
    - script:
        name: go get
        code: |
         go get -t ./...

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

    # Test the project
    - script:
        name: go test
        code: |
          export POSTGRES_DSN="user=nogo password=password host=$POSTGRES_PORT_5432_TCP_ADDR port=$POSTGRES_PORT_5432_TCP_PORT sslmode=disable dbname=nogo"
          go test ./...

Update to Go 1.7 and Postgres 9.5
Update to Go 1.7 and Postgres 9.5
